.cl-visit-profile{grid-area:vitals / 1 / auto / -1;padding:12px 13px;border:1px solid #cedee9;border-radius:11px;background:#f8fbfd;margin:3px 0}
#dashboard .cl-compact-patient .cl-visit-profile{grid-column:1 / -1;grid-row:auto}
.cl-visit-profile-header h3{font-size:14px;margin:0 0 5px!important;color:#17455c}
.cl-visit-profile-header p{font-size:12px;margin:0 0 11px;color:#5a7180}
.cl-profile-sections{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.cl-profile-category{min-width:0;background:#fff;border:1px solid #dfeaf0;padding:10px;border-radius:9px}
.cl-profile-category-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.cl-profile-category-top strong{font-size:12px}
.cl-profile-category-top button{font-size:11px;padding:5px 7px}
.cl-profile-category>.cl-mini{font-size:11px;line-height:1.35;margin:5px 0}
.cl-profile-row{display:grid;grid-template-columns:minmax(100px,2fr) minmax(65px,1fr);gap:5px;padding:9px 0;border-top:1px solid #eaf1f4}
.cl-profile-row .cl-profile-input,.cl-profile-row select{min-width:0;width:100%;margin:0;padding:6px 7px;font-size:12px;height:32px}
.cl-profile-row select{color:#275269}
.cl-profile-row [data-field=name]{grid-column:1}
.cl-profile-row [data-field=status]{grid-column:2}
.cl-profile-row [data-field=detail],.cl-profile-row [data-field=dose]{grid-column:1}
.cl-profile-row [data-field=frequency],.cl-profile-row [data-field=date]{grid-column:2}
.cl-visit-profile #clVisitProfileStatus{font-size:12px;margin:11px 0 2px}
#clVisitEditReasonWrap{display:block;grid-column:1 / -1;font-size:12px;font-weight:600;background:#fff8ec;border:1px solid #e3cc9b;padding:10px;border-radius:8px}
#clVisitEditReasonWrap textarea{display:block;width:100%;min-height:48px;margin-top:6px}
#dashboard .cl-compact-patient .cl-encounter-fields .cl-visit-profile{grid-area:auto;grid-column:1 / -1}
#dashboard .cl-compact-patient .cl-encounter-fields{grid-template-areas:"date complaint" "history examination" "vitals vitals" "assessment treatment" "recommendations recommendations" "profile profile" "footer footer"}
#dashboard .cl-compact-patient .cl-encounter-fields .cl-visit-profile{grid-area:profile}
#dashboard .cl-compact-patient .cl-encounter-footer{grid-area:footer}
.cl-profile-quick{margin:8px 0 0;padding:11px;border:1px solid #cadddc;border-radius:8px;background:#f6fbf9}
.cl-profile-quick strong{font-size:16px}
.cl-profile-quick p{margin:5px 0;font-size:15px;line-height:1.5}
.cl-profile-quick button{font-size:15px;margin:8px 0 0;padding:6px 9px}
#clEditSelectedVisit{font-size:11px;padding:7px 9px;white-space:normal}
@media(max-width:950px){
 .cl-profile-sections{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" "profile" "footer"}
}

/* Wide, top-to-bottom medication entry; no horizontal medication forms. */
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"]{
 grid-column:1/-1;display:flex;flex-direction:column;gap:6px
}
#dashboard .cl-compact-patient .cl-med-dictation{width:100%;min-width:0;border:1px solid #c8dfe9;border-radius:12px;background:#f6fafc;padding:14px}
#dashboard .cl-compact-patient .cl-med-dictation>label{display:block;font-size:13px;font-weight:700;margin:0 0 6px}
#dashboard .cl-compact-patient .cl-med-dictation .cl-mini{font-size:12px;margin:5px 0 9px}
#dashboard .cl-compact-patient #clVisitMedicationSpeech{display:block;width:100%;min-height:152px;resize:vertical;padding:12px 14px;font:inherit;font-size:14px;line-height:1.7;border:1px solid #b8cbd7;border-radius:9px;background:#fff;white-space:pre-wrap}
#dashboard .cl-compact-patient .cl-med-dictation>.cl-mic-button{display:inline-block;margin:7px 7px 4px 0!important;width:auto;padding:7px 13px!important;min-height:32px;font-size:12px!important}
#dashboard .cl-compact-patient .cl-med-dictation>.cl-mic-status{display:inline-block;margin:4px 0;font-size:11px}
#dashboard .cl-compact-patient .cl-med-dictation-actions{display:flex;flex-wrap:wrap;gap:7px;margin:9px 0}
#dashboard .cl-compact-patient .cl-med-dictation-actions button{font-size:12px;padding:8px 11px}
#dashboard .cl-compact-patient .cl-med-dictation-feedback{font-size:12px;color:#244f67;margin:6px 0}
#dashboard .cl-compact-patient .cl-med-existing-heading{font-size:12px;margin:16px 0 5px;font-weight:700}
#dashboard .cl-compact-patient .cl-med-candidates{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:9px}
#dashboard .cl-compact-patient .cl-med-candidate-card{background:white;border:1px solid #cadee9;border-radius:9px;min-width:0;padding:11px}
#dashboard .cl-compact-patient .cl-med-candidate-card[data-added=true]{background:#f3faf6;border-color:#b7d8c3}
#dashboard .cl-compact-patient .cl-med-candidate-card.cl-med-no-match{border-color:#e8d4ac;background:#fffaf0}
#dashboard .cl-compact-patient .cl-med-candidate-title{display:block;font-size:13px;overflow-wrap:anywhere;margin:0 0 5px}
#dashboard .cl-compact-patient .cl-med-candidate-picker,
#dashboard .cl-compact-patient .cl-med-candidate-rename{width:100%;min-width:0;padding:8px;margin:7px 0;font-size:12px}
#dashboard .cl-compact-patient .cl-med-candidate-tools{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
#dashboard .cl-compact-patient .cl-med-candidate-tools button{padding:7px 9px;font-size:11px;max-width:100%;white-space:normal}
#dashboard .cl-compact-patient .cl-med-match-notice{font-size:12px;line-height:1.5;margin:7px 0;color:#546b7b}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-rows{display:block;width:100%}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;
 border:1px solid #e1eaf1;border-radius:8px;padding:10px;margin:9px 0;background:#fff
}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row [data-field=name]{
 grid-column:1/-1;min-height:38px;height:auto;font-weight:650
}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row [data-field=dose]{grid-column:1}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row [data-field=frequency]{grid-column:2}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row [data-field=status]{grid-column:1/-1}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row .cl-mic-button,
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row .cl-mic-status{display:none!important}
@media(max-width:700px){
 #dashboard .cl-compact-patient .cl-med-candidates{grid-template-columns:1fr}
 #dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row{grid-template-columns:1fr}
 #dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row [data-field]{grid-column:1/-1}
}

/* Each recognized medicine and its candidate choices occupy a full-width line. */
#dashboard .cl-compact-patient .cl-med-candidates{display:flex;flex-direction:column;gap:9px}
#dashboard .cl-compact-patient .cl-med-candidate-card{width:100%}
#dashboard .cl-compact-patient .cl-med-candidate-card .cl-mic-button,
#dashboard .cl-compact-patient .cl-med-candidate-card .cl-mic-status{display:none!important}

#dashboard .cl-compact-patient .cl-verified-alias-source{display:inline-block;margin:5px 0 9px;font-size:11px;color:#226689;text-decoration:underline;overflow-wrap:anywhere}
#dashboard .cl-compact-patient .cl-med-candidate-card.cl-med-no-match{border-left:3px solid #d49f47}

/* From 3 characters: official TİTCK brand search suggestions.
   Inline panels remain narrow and never obscure the medication consent controls. */
.cl-drug-autocomplete{display:flex;flex-direction:column;gap:0;width:100%;max-height:250px;overflow:auto;background:#fff;border:1px solid #b9d3df;border-radius:8px;box-shadow:0 3px 10px #1d56741c;margin:4px 0 10px;padding:4px}
.cl-drug-autocomplete[hidden]{display:none!important}
.cl-drug-autocomplete-hint{font-size:11px;color:#466879;padding:6px 8px;margin:0!important}
.cl-drug-autocomplete-option{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;width:100%;padding:8px 9px!important;border:0!important;border-radius:6px;text-align:left;background:transparent!important;color:#20465b!important;cursor:pointer}
.cl-drug-autocomplete-option:hover,.cl-drug-autocomplete-option:focus-visible{background:#dfeff6!important;outline:2px solid #a7cbdc;outline-offset:-2px}
.cl-drug-autocomplete-option>strong{font-size:12px;flex:0 1 auto}
.cl-drug-autocomplete-meta{font-size:10px;color:#587386;flex:0 1 auto;overflow-wrap:anywhere}
#dashboard .cl-compact-patient .cl-drug-autocomplete{grid-column:1/-1;flex:0 0 100%}
#dashboard .cl-compact-patient .cl-med-candidate-rename+.cl-drug-autocomplete{margin:3px 0 8px}
@media(max-width:700px){.cl-drug-autocomplete-option{flex-wrap:wrap;gap:4px}}

/* Editable purpose alongside each medicine, with clear draft-only remove/add. */
#dashboard .cl-compact-patient .cl-med-candidate-purpose-wrap{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:650;margin:8px 0}
#dashboard .cl-compact-patient .cl-med-candidate-purpose{width:100%;height:38px;padding:8px 10px;font-size:13px;font-weight:400;min-width:0;border:1px solid #b7cbd7;border-radius:7px}
#dashboard .cl-compact-patient .cl-med-general-indication{font-size:11px;line-height:1.5;color:#365a6d;margin:5px 0 8px;padding-left:7px;border-left:2px solid #9fc0d0}
#dashboard .cl-compact-patient .cl-med-general-indication:empty{display:none}
#dashboard .cl-compact-patient .cl-med-candidate-remove{background:#fff1ed!important;color:#a0402b!important;border:1px solid #e6c0b7!important}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row [data-field="purpose"]{grid-column:1 / -1;min-height:38px}
#dashboard .cl-compact-patient .cl-med-row-remove{grid-column:1 / -1;font-size:11px;text-align:center;background:#fff1ed;color:#993e2c;border:1px solid #e8c8c0;padding:6px 9px;margin:3px 0}

#dashboard .cl-compact-patient .cl-med-candidate-indication{display:block;width:100%;min-width:0;font-size:12px;margin:7px 0;padding:8px;border:1px solid #c2d3df;border-radius:7px;background:#fff}
#dashboard .cl-compact-patient .cl-med-candidate-indication:disabled{opacity:.6}
#dashboard .cl-compact-patient .cl-med-candidate-card>button{font-size:11px;padding:8px 10px;margin:3px 0 8px}
#dashboard .cl-compact-patient .cl-med-candidate-card>button:disabled{opacity:.5}
#dashboard .cl-compact-patient .cl-med-segmentation-notice{font-size:11px;border-left:3px solid #d1a548;background:#fff8e9;padding:7px 10px;margin:5px 0 9px;color:#6e4f20;overflow-wrap:anywhere}
#dashboard .cl-compact-patient .cl-med-unresolved-previous:not(:empty){border:1px solid #e4d4ab;border-radius:8px;background:#fffaf1;margin:14px 0;padding:10px}
#dashboard .cl-compact-patient .cl-med-unresolved-previous>strong{font-size:12px;display:block;margin-bottom:6px}
#dashboard .cl-compact-patient .cl-med-pending-row{display:flex;align-items:center;justify-content:space-between;gap:9px;border-top:1px solid #eee0bd;padding:6px 0;font-size:11px}
#dashboard .cl-compact-patient .cl-med-pending-row span{min-width:0;overflow-wrap:anywhere}
#dashboard .cl-compact-patient .cl-med-pending-row button{font-size:11px;padding:6px 9px;flex-shrink:0}

#dashboard .cl-compact-patient #clVisitEditReasonWrap{display:block;margin:6px 0 11px;padding:13px 16px;border:2px solid #d6a14a;border-radius:9px;background:#fff5dc;font-weight:700;font-size:13px;color:#75460b}
#dashboard .cl-compact-patient #clVisitEditReasonWrap[hidden]{display:none!important}
#dashboard .cl-compact-patient #clVisitEditReason{display:block;width:100%;min-height:74px;margin:7px 0 0;border:1px solid #c7a46a;background:white;padding:9px 11px;font-size:13px;font-weight:400}
#dashboard .cl-compact-patient #clVisitEditReason[aria-invalid="true"]{outline:3px solid #e05c4a;border-color:#c44232}
#dashboard .cl-compact-patient .cl-encounter-heading .cl-save-quick{margin-left:auto;font-size:12px;padding:9px 11px;white-space:normal}
#dashboard .cl-compact-patient .cl-encounter-heading .cl-save-quick[hidden]{display:none!important}
#dashboard .cl-compact-patient #clEncounterSaveFeedback{margin:6px 0 10px;padding:12px 14px;border-radius:9px;font-weight:650;font-size:13px;border:1px solid #b8d1e0;background:#eff7fb;color:#26526b}
#dashboard .cl-compact-patient #clEncounterSaveFeedback[hidden]{display:none!important}
#dashboard .cl-compact-patient #clEncounterSaveFeedback[data-kind="error"]{background:#fff1ee;border:2px solid #d96852;color:#8b2b21}
#dashboard .cl-compact-patient #clEncounterSaveFeedback[data-kind="success"]{background:#eaf8f0;border:1px solid #8dc3a0;color:#135438}
#dashboard .cl-compact-patient #clEncounterSaveFeedback[data-kind="info"]{background:#edf7fc;color:#21556f}
#dashboard .cl-compact-patient #clVisitSaveReceipt{margin:10px 0;padding:16px 18px;border:2px solid #80c19d;border-radius:11px;background:#effaf3;color:#184a33}
#dashboard .cl-compact-patient #clVisitSaveReceipt[hidden]{display:none!important}
#dashboard .cl-compact-patient #clVisitSaveReceipt>strong{font-size:15px}
#dashboard .cl-compact-patient #clVisitSaveReceipt>p{font-size:12px;line-height:1.55;margin:6px 0 12px}
#dashboard .cl-compact-patient .cl-save-receipt-actions{display:flex;flex-wrap:wrap;gap:8px}
#dashboard .cl-compact-patient .cl-save-receipt-actions button{font-size:12px;padding:8px 10px}

/* Microphone is a compact inline control anchored to its OWN field.
   A wrapper is one grid item, preventing microphone buttons drifting
   to the bottom of encounter and medication forms. */
.cl-mic-field{position:relative;display:block;width:100%;min-width:0;max-width:100%;vertical-align:top}
.cl-mic-field>input,.cl-mic-field>textarea,.cl-mic-field>select{width:100%!important;min-width:0!important;box-sizing:border-box;padding-right:41px!important}
#dashboard .cl-mic-field>.cl-mic-button,
#dashboard .cl-compact-patient .cl-profile-row .cl-mic-field>.cl-mic-button,
#dashboard .cl-compact-patient .cl-med-candidate-card .cl-mic-field>.cl-mic-button{
 display:flex!important;align-items:center!important;justify-content:center!important;
 position:absolute!important;right:5px!important;top:5px!important;z-index:2;
 width:29px!important;min-width:29px!important;max-width:29px!important;
 height:28px!important;min-height:28px!important;max-height:28px!important;
 padding:4px!important;margin:0!important;border:1px solid #c5dae5!important;
 border-radius:7px!important;background:#eef5f9!important;color:#21617c!important;
 cursor:pointer;opacity:.94;white-space:nowrap;
}
#dashboard .cl-mic-field>.cl-mic-button:focus-visible{outline:2px solid #076b91;outline-offset:2px}
#dashboard .cl-mic-field>.cl-mic-button[aria-pressed="true"]{background:#fce8e4!important;color:#aa3124!important;border-color:#dc8579!important}
#dashboard .cl-mic-field>.cl-mic-button svg{display:block!important;pointer-events:none;flex-shrink:0}
#dashboard .cl-mic-field>.cl-mic-status{display:none;max-width:100%;color:#326581;font-size:11px;line-height:1.35;padding:4px 2px 5px;margin:0;overflow-wrap:anywhere}
#dashboard .cl-mic-field>.cl-mic-status:not(:empty){display:block}
#dashboard .cl-mic-field.cl-mic-textarea>.cl-mic-button{top:9px!important}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row>.cl-mic-field:has([data-field="name"]),
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row>.cl-mic-field:has([data-field="purpose"]),
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row>.cl-mic-field:has([data-field="status"]){grid-column:1/-1}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row>.cl-mic-field:has([data-field="dose"]){grid-column:1}
#dashboard .cl-compact-patient .cl-profile-category[data-group="medications"] .cl-profile-row>.cl-mic-field:has([data-field="frequency"]){grid-column:2}
#dashboard .cl-compact-patient .cl-profile-category:not([data-group="medications"]) .cl-profile-row>.cl-mic-field:has([data-field="name"]){grid-column:1}
#dashboard .cl-compact-patient .cl-profile-category:not([data-group="medications"]) .cl-profile-row>.cl-mic-field:has([data-field="status"]),
#dashboard .cl-compact-patient .cl-profile-category:not([data-group="medications"]) .cl-profile-row>.cl-mic-field:has([data-field="frequency"]),
#dashboard .cl-compact-patient .cl-profile-category:not([data-group="medications"]) .cl-profile-row>.cl-mic-field:has([data-field="date"]){grid-column:2}
#dashboard .cl-compact-patient .cl-profile-category:not([data-group="medications"]) .cl-profile-row>.cl-mic-field:has([data-field="detail"]){grid-column:1}
#dashboard .cl-compact-patient .cl-med-candidate-card[data-added="true"] .cl-med-match-notice{color:#215e38;background:#eaf8ef;border-left:3px solid #69b18a;padding:8px;border-radius:5px}
#dashboard .cl-compact-patient .cl-med-candidate-card[data-added="true"] .cl-med-candidate-tools button:nth-child(2){background:#e5f5ec!important;color:#246044!important}
@media(max-width:700px){
 #dashboard .cl-compact-patient .cl-profile-category .cl-profile-row>.cl-mic-field{grid-column:1/-1!important}
}

#dashboard .cl-compact-patient .cl-med-resolved-preview{font-size:11px;color:#215c3d;background:#eaf7ef;border:1px solid #abd7b7;padding:8px 10px;margin:7px 0 2px;border-radius:7px;line-height:1.4}

/* Single-action drug confirmation: only remove-card + add-medicine buttons. */
#dashboard .cl-med-candidate-card .cl-med-candidate-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}
#dashboard .cl-med-candidate-card .cl-med-candidate-tools>.cl-med-candidate-remove{order:1}
#dashboard .cl-med-candidate-card .cl-med-candidate-tools>button:not(.cl-med-candidate-remove){order:2;background:#0c708d;color:#fff;font-weight:700}
#dashboard .cl-med-candidate-card .cl-med-candidate-tools>button:not(.cl-med-candidate-remove):disabled{background:#e7f5ed;color:#276347}
#dashboard .cl-med-candidate-card .cl-med-candidate-indication{width:100%;margin:8px 0 4px}

/* Surgery history: clinician only enters name, procedure details and year. */
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row{
 display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(110px,140px);
 column-gap:8px;align-items:start;
}
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>[data-field="name"],
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>.cl-mic-field:has([data-field="name"]){grid-column:1!important}
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>[data-field="detail"],
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>.cl-mic-field:has([data-field="detail"]){grid-column:2!important}
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>.cl-surgery-year{
 grid-column:3!important;min-height:34px;height:34px!important;max-width:140px
}
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-surgery-year::-webkit-inner-spin-button{-webkit-appearance:none}
#dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-surgery-year{-moz-appearance:textfield}
@media(max-width:760px){
 #dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row{grid-template-columns:1fr 112px}
 #dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>.cl-mic-field:has([data-field="name"]){grid-column:1/-1!important}
 #dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>.cl-mic-field:has([data-field="detail"]){grid-column:1!important}
 #dashboard .cl-compact-patient .cl-profile-category[data-group="surgeries"] .cl-profile-row>.cl-surgery-year{grid-column:2!important}
}
