.conduct-ai-history{margin:22px 0;padding:24px;background:#fff;border:1px solid #d5e2ee;border-radius:18px;scroll-margin-top:100px;color:#173f61}
.conduct-ai-history>summary{cursor:pointer;font-weight:700}.conduct-ai-history>p{line-height:1.55}
[data-conduct-history-list]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
[data-conduct-history-list]>section{padding:16px;border:1px solid #cbdfea;border-radius:12px;min-width:0}
.conduct-history-analysis{background:#f0f6fc}.conduct-history-chat{background:#eff9f5}
[data-conduct-history-list] h3{margin:0 0 12px;font-size:17px}
.conduct-history-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;margin:10px 0}
.conduct-history-open{min-height:56px;text-align:left;white-space:normal!important;line-height:1.5;padding:12px 16px!important}
body.app-shell .conduct-history-analysis .conduct-history-open,body.app-shell .conduct-history-analysis .conduct-history-delete{background:#c9dff7!important;border:1px solid #8db3df!important;color:#153f70!important}
body.app-shell .conduct-history-chat .conduct-history-open{background:#def0e8!important;border:1px solid #b6d9c9!important;color:#1c5549!important}
.conduct-history-toggle{margin-top:8px}[data-conduct-history-list] [hidden]{display:none!important}
.conduct-history-trash{grid-column:1/-1;padding:14px 18px;border:1px solid #8db3df;border-radius:12px;background:#f0f6fd}
.conduct-history-trash>summary{cursor:pointer;font-weight:700;color:#153f70}
.conduct-trash-record{background:#fff;border:1px solid #d5e2ee;border-radius:12px;padding:14px 16px;margin:12px 0}
.conduct-trash-identity{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;min-width:0;font-size:14px}
.conduct-category-pill{display:inline-flex;padding:6px 12px;border:1px solid;border-radius:999px;font-size:13px;font-weight:700;line-height:1.4}
.conduct-category-analysis{background:#c9dff7;border-color:#8db3df;color:#153f70}.conduct-category-chat{background:#def0e8;border-color:#b6d9c9;color:#1c5549}
body.app-shell dialog.conduct-history-dialog{width:min(520px,calc(100vw - 32px));margin:auto;padding:26px;border:1px solid #d5e2ee;border-radius:18px;background:#fff;color:#173f61}
.conduct-history-dialog::backdrop{background:#102d3b80}.conduct-history-dialog p{line-height:1.55}.conduct-history-dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px}
body.app-shell [data-conduct-review]{background:linear-gradient(120deg,#2aafb0,#08738f)!important;border-color:#08738f!important;color:#fff!important}
[data-conduct-review-result]{font-size:16px;line-height:1.65;max-height:65vh;overflow:auto;overflow-wrap:anywhere}
.conduct-ai-review,[data-cc-messages]{scroll-margin-top:100px}
@media(max-width:850px){[data-conduct-history-list]{grid-template-columns:1fr}}

.conduct-workspace .rx-chat [data-cc-question]{padding:16px;font-size:16px;line-height:1.65;min-height:180px;resize:vertical;background:#f7fbff;border:1px solid #cfe2f0;border-radius:14px;box-sizing:border-box;width:100%;color:#173f61}
.conduct-workspace .rx-chat [data-cc-messages]{font-size:16px;line-height:1.65}
.conduct-workspace .rx-chat .rx-message p{white-space:pre-wrap;overflow-wrap:anywhere}

/* Mesma apresentação do chat da anamnese. */
body.app-shell .conduct-workspace .rx-chat{position:static;padding:22px;font:400 14px/1.52 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#243b4c}
body.app-shell .conduct-workspace .rx-chat>header{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
body.app-shell .conduct-workspace .rx-chat>label{display:block;font-weight:700;margin:16px 0 10px}
body.app-shell .conduct-workspace .rx-chat [data-cc-mode]{display:block;width:100%;max-width:none;height:42px;min-height:42px!important;margin:4px 0 0;padding:0 36px 0 14px!important;font:inherit;font-weight:700;color:#173f61!important;background-color:#f7faff!important;border-color:#b9d0ed!important;border-radius:10px!important;background-image:none!important;appearance:auto!important;box-shadow:0 1px 3px #173f6108}
body.app-shell .conduct-workspace .rx-chat [data-cc-mode]:focus-visible{outline:3px solid #b7e4ee!important;outline-offset:2px}
body.app-shell .conduct-workspace .rx-chat small{font-size:12px;line-height:1.5;color:#607b91}
body.app-shell .conduct-workspace .conduct-chat-composer{display:block;margin-top:18px}
body.app-shell .conduct-workspace .conduct-chat-composer>label{display:block;font-weight:700;margin:0 0 8px}
body.app-shell .conduct-workspace .rx-chat [data-cc-question]{font:400 16px/1.6 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;padding:13px 14px;min-height:200px!important;margin:8px 0 14px;background:#f8fbff;border:1px solid #bfd3e5;border-radius:14px;color:#183d5b;box-shadow:inset 0 1px 3px #123b5b05}
body.app-shell .conduct-workspace .rx-chat [data-cc-question]::placeholder{font:inherit;color:#71879c;opacity:1}
body.app-shell .conduct-workspace .rx-chat .rx-chat-actions{gap:12px}
body.app-shell .conduct-workspace .rx-chat .conduct-chat-saved{border:0;border-radius:9px;padding:0;margin:16px 0 6px}
body.app-shell .conduct-workspace .rx-chat .conduct-chat-saved>summary{font-weight:700;color:#173f61;cursor:pointer}
body.app-shell .conduct-workspace .rx-chat .conduct-chat-saved button{margin-top:10px}
body.app-shell .conduct-workspace .rx-chat [data-cc-status]:empty{display:none}
@media(max-width:600px){body.app-shell .conduct-workspace .rx-chat{padding:16px!important}body.app-shell .conduct-workspace .rx-chat [data-cc-question]{min-height:160px!important}}

/* Rodapé de Conduta com o mesmo padrão da anamnese. */
body.app-shell [data-care-type="conduct"] .anamnesis-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
body.app-shell [data-care-type="conduct"] [data-conduct-review]{background:linear-gradient(120deg,#2aafb0,#08738f)!important;border-color:#08738f!important;color:#fff!important}
body.app-shell [data-care-type="conduct"] [data-conduct-review]:hover{filter:brightness(.95)}
body.app-shell [data-care-type="conduct"] [data-conduct-review]:focus-visible{outline:3px solid #42bdc8;outline-offset:3px}
body.app-shell [data-conduct-finalize-submit][hidden],body.app-shell [data-conduct-analysis-panel][hidden]{display:none!important}

body.app-shell #conduct-analyze-button{background:linear-gradient(120deg,#2aafb0,#08738f)!important;border-color:#08738f!important;color:#fff!important}

body.app-shell .conduct-analysis-section{margin:22px 0;padding-top:14px;border-top:1px solid #d5e2ee}
body.app-shell .conduct-analysis-section h4{font-size:17px;line-height:1.5;margin:0 0 10px;color:#143552}
body.app-shell .conduct-analysis-section ul{padding-left:22px;margin:0}
body.app-shell .conduct-analysis-section li{margin:10px 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
body.app-shell [data-conduct-review-result] p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}
body.app-shell [data-conduct-review-result] .conduct-reviewed-text{padding:16px;background:#fff;border:1px solid #d5e2ee;border-radius:12px;font-size:16px;line-height:1.7}
