/* CAMADA-MED R8.0 consolidated CSS bundle (camadamed-platform-tail-r720.css): 2 stylesheets in exact original cascade order. */

/* --- source: assets/css/camadamed-context-r6114.css --- */
/* Local hierarchy changes; the existing Safira / Liquid Glass files stay unchanged. */
#cmlDialog .cml-current-encounter{border-bottom:1px solid var(--cml-line,#9ec5ef40);padding:0 0 14px;margin:0 0 18px}
#cmlDialog .cml-current-encounter>.cml-row{align-items:center;gap:10px;flex-wrap:wrap}
#cmlDialog .cml-current-encounter time{font-size:13px;line-height:1.5;color:var(--cml-muted,#b5c7d5);font-variant-numeric:tabular-nums}
#cmlDialog .cml-current-encounter #cmlDraftStatus{margin:8px 0;font-size:13px;line-height:1.5}
#cmlDialog .cml-current-encounter>details{margin-top:8px}
#cmlDialog .cml-current-encounter>details>summary{font-size:13px;line-height:1.5;min-height:36px;display:list-item}
#cmlDialog .cml-current-encounter>details[open]{padding-top:6px}
#cmlDialog #cmlDailyOverview>.cml-actions{justify-content:flex-start}
#cmlDialog #cmlDailyOverview>.cml-note{margin:10px 0 18px}
#cmlDialog #cmlDailyOverview textarea{min-height:132px}
#cmlDialog .cml-prior-treatment{padding:14px 0;border-bottom:1px solid var(--cml-line,#9ec5ef40)}
#cmlDialog .cml-prior-treatment:last-child{border:0}
#cmlDialog .cml-treatment-table .cml-treatment-pending{color:#d9e8fb;font-weight:650}
@media(max-width:640px){#cmlDialog .cml-current-encounter{padding-bottom:12px;margin-bottom:14px}#cmlDialog #cmlDailyOverview textarea{min-height:150px}}


/* --- source: assets/css/camadamed-focus-r6115.css --- */
/* R6.115. Local hierarchy on the approved Safira/Liquid Glass surfaces. */
html body.cm-platform-page #cmlDialog .cml-focus-purpose{margin:12px 0 24px;padding:16px 20px;border-left:2px solid #8fbdf5;background:#8fbdf508;border-radius:0 14px 14px 0}
html body.cm-platform-page #cmlDialog .cml-focus-purpose p{margin:0;line-height:1.6;color:#eff5ff;font-size:16px}
html body.cm-platform-page #cmlDialog .cml-focus-purpose strong{font-weight:650;margin-right:8px;color:#c5dcfa}
html body.cm-platform-page #cmlDialog .cml-focus-purpose .cml-focus-next{margin-top:7px;font-size:14px;color:#becfe7}
html body.cm-platform-page #cmlDialog .cml-stepper{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:6px!important;margin:16px 0!important;padding:5px!important;border:1px solid #a4c9f02b;border-radius:20px;background:#091a2b4d}
html body.cm-platform-page #cmlDialog .cml-stepper button{min-height:58px!important;border-radius:15px!important;flex-direction:row!important;justify-content:center!important;align-items:center!important;gap:8px!important;padding:10px 8px!important;min-width:0!important;text-align:left!important;background:transparent!important;border:1px solid transparent!important;color:#bfcfe5!important;box-shadow:none!important}
html body.cm-platform-page #cmlDialog .cml-stepper button>b{font-size:12px!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}
html body.cm-platform-page #cmlDialog .cml-stepper button>span{width:24px!important;height:24px!important;line-height:24px!important;font-size:12px!important;background:#9bc8fb12!important;color:#d7e8ff!important}
html body.cm-platform-page #cmlDialog .cml-stepper button[aria-current=step]{background:#9dcaff20!important;border-color:#a8cdff70!important;color:#f4f8ff!important}
html body.cm-platform-page #cmlDialog .cml-stepper button[aria-current=step]>span{background:#d2e5ff!important;color:#13253b!important}
html body.cm-platform-page #cmlDialog .cml-stepper button.is-reviewed:not([aria-current=step])>span{background:#2dd4bf1a!important;color:#8ce5d9!important}
html body.cm-platform-page #cmlDialog .cml-focus-workspace{display:grid;grid-template-columns:minmax(0,1fr);gap:24px;align-items:start;min-width:0}
html body.cm-platform-page #cmlDialog .cml-focus-context{padding:16px 18px;border:1px solid #aacdf333;border-radius:18px;background:#0d1f34b8;min-width:0;color:#dfebfb;display:grid;gap:10px}
html body.cm-platform-page #cmlDialog .cml-focus-context>b{font-size:14px;line-height:1.6;color:#eaf3ff}
html body.cm-platform-page #cmlDialog .cml-focus-context time,html body.cm-platform-page #cmlDialog .cml-focus-context small{font-size:12px;line-height:1.6;color:#b9cce6}
html body.cm-platform-page #cmlDialog .cml-focus-draft{font-size:12px;color:#c9dfff}
html body.cm-platform-page #cmlDialog .cml-focus-reference{margin:2px 0;padding:0;border:0;background:transparent;box-shadow:none}
html body.cm-platform-page #cmlDialog .cml-focus-reference summary{min-height:44px;display:flex;align-items:center;cursor:pointer;font-size:14px;color:#d3e5ff}
html body.cm-platform-page #cmlDialog .cml-focus-reference summary:before{content:'+';margin-right:10px}
html body.cm-platform-page #cmlDialog .cml-focus-reference[open] summary:before{content:'−'}
html body.cm-platform-page #cmlDialog .cml-focus-context dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:14px 0;font-size:13px;line-height:1.5}
html body.cm-platform-page #cmlDialog .cml-focus-context dd{margin:0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
html body.cm-platform-page #cmlDialog .cml-focus-diagnosis{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.6;margin:10px 0}
html body.cm-platform-page #cmlDialog .cml-focus-return-note{font-size:13px;line-height:1.6;color:#b8cde9;margin:0}
html body.cm-platform-page #cmlDialog .cml-focus-tool-content{min-width:0;max-width:100%}
html body.cm-platform-page #cmlDialog[data-focus-tool="1"] .cml-dialog-head>button{max-width:230px;white-space:normal!important;text-align:center;line-height:1.4!important}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey{grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey>.cml-command-card{display:grid!important;grid-template-columns:38px minmax(0,1fr) auto;column-gap:16px;row-gap:5px;min-height:0!important;padding:18px 20px!important;align-items:center}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-card-top{display:contents}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-number{grid-column:1;grid-row:1/3;font-size:16px!important}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-stage-state{grid-column:2;grid-row:2;justify-self:start;text-align:left;font-size:12px!important;color:#bad0ee}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey h4{grid-column:2;grid-row:1;font-size:18px!important;margin:0!important}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey article>p{display:none;margin:4px 0!important;grid-column:2;grid-row:3;font-size:14px!important;line-height:1.6!important}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey article[aria-current=step]>p{display:block}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-card-actions{grid-column:3;grid-row:1/4;margin:0!important}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-card-actions>button{min-height:44px;max-width:260px;font-size:14px;line-height:1.4}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-more{grid-column:2/-1;grid-row:4;margin:4px 0 0!important;padding-top:4px!important}
html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey article[aria-current=step]{border-color:#a7cfff90!important;background-color:#9cc5ff0b!important}
html body.cm-platform-page #cmlDialog :is(button,input,textarea,select,summary):focus-visible{outline:2px solid #b4d8ff!important;outline-offset:3px}
@media(min-width:1080px){
 html body.cm-platform-page #cmlDialog[data-focus-tool="1"] .cml-focus-workspace{grid-template-columns:240px minmax(0,1fr);gap:30px}
 html body.cm-platform-page #cmlDialog .cml-focus-context{position:sticky;top:0}
}
@media(max-width:760px){
 html body.cm-platform-page #cmlDialog .cml-stepper{display:flex!important;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scroll-snap-type:x proximity;border-radius:16px;-webkit-overflow-scrolling:touch}
 html body.cm-platform-page #cmlDialog .cml-stepper button{flex:0 0 145px!important;min-height:52px!important;scroll-snap-align:center}
 html body.cm-platform-page #cmlDialog .cml-focus-context{padding:12px 14px;gap:5px}
 html body.cm-platform-page #cmlDialog .cml-focus-return-note{display:none}
 html body.cm-platform-page #cmlDialog .cml-focus-workspace{gap:20px}
 html body.cm-platform-page #cmlDialog .cml-focus-purpose{padding:12px 14px;margin-bottom:20px}
 html body.cm-platform-page #cmlDialog[data-focus-tool="1"] .cml-dialog-head>button{max-width:130px;font-size:12px!important}
}
@media(max-width:600px){
 html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey>.cml-command-card{grid-template-columns:28px minmax(0,1fr);gap:8px 12px;padding:16px!important}
 html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-card-actions{grid-column:2;grid-row:4;justify-content:start}
 html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-card-actions>button{width:100%;max-width:none}
 html body.cm-platform-page.cm-premium-r636 #cmlPatient .cml-focus-journey .cml-command-more{grid-column:2;grid-row:5}
}
@media(prefers-reduced-motion:reduce){
 html body.cm-platform-page #cmlDialog .cml-stepper{scroll-behavior:auto!important}
 html body.cm-platform-page #cmlDialog .cml-focus-workspace{animation:none!important;transition:none!important}
}
@media print{html body.cm-platform-page #cmlDialog .cml-focus-context{display:none!important}html body.cm-platform-page #cmlDialog .cml-focus-workspace{display:block!important}}

/* A selected patient drug opens directly in its card; another search remains available. */
html body.cm-platform-page #cmlDialog .cmm-patient-focused .cmm-heading,
html body.cm-platform-page #cmlDialog .cmm-patient-focused .cmm-search,
html body.cm-platform-page #cmlDialog .cmm-patient-focused .cmm-country,
html body.cm-platform-page #cmlDialog[data-focus-tool="1"] .cmp-therapy-study>.cml-actions>[data-cm-patient-tool="therapy-return"]{display:none!important}
html body.cm-platform-page #cmlDialog .cmm-patient-focused .cmm-card-heading{gap:12px;align-items:flex-start}
html body.cm-platform-page #cmlDialog .cml-study-to-recall{margin:24px 0;border-top:1px solid #99c5fa33;padding-top:20px}

html body.cm-platform-page #cmlDialog .cml-guide-intro{border:0!important;padding:0!important;margin:8px 0!important;gap:8px!important;min-height:0!important}
html body.cm-platform-page #cmlDialog .cml-guide-intro>p{display:none!important}
html body.cm-platform-page #cmlDialog .cml-current-encounter>details{padding:0!important;margin:4px 0 0!important;background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important}
html body.cm-platform-page #cmlDialog .cml-current-encounter>details>summary{min-height:44px!important;padding:10px 0!important;font-size:13px!important;line-height:1.5!important}
html body.cm-platform-page #cmlDialog .cml-current-encounter>details[open]{padding-bottom:12px!important}
html body.cm-platform-page #cmlDialog .cml-current-encounter{padding-bottom:10px!important;margin-bottom:10px!important}
html body.cm-platform-page #cmlDialog .cml-stepper button>b{color:#d5e4f8!important;-webkit-text-fill-color:#d5e4f8!important}
html body.cm-platform-page #cmlDialog .cml-stepper button[aria-current=step]>b{color:#f4f8ff!important;-webkit-text-fill-color:#f4f8ff!important}
html body.cm-platform-page #cmlDialog .cml-stepper button>span{-webkit-text-fill-color:currentColor!important}

/* R7.15: Live clinical context strip across all six stages (Safira surface, high contrast, mobile-first). */
html body.cm-platform-page #cmlDialog .cml-case-strip{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0 8px;padding:10px 12px;border:1px solid #a4c9f036;border-radius:16px;background:#0a1929cc;min-width:0}
html body.cm-platform-page #cmlDialog .cml-strip-chip{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 10px;border-radius:11px;border:1px solid #9dc6f330;background:#11263e;color:#eef6ff!important;-webkit-text-fill-color:#eef6ff!important;font-size:12.5px;line-height:1.35;text-align:left;max-width:100%;min-width:0;cursor:pointer}
html body.cm-platform-page #cmlDialog button.cml-strip-chip:hover,html body.cm-platform-page #cmlDialog button.cml-strip-chip:focus-visible{border-color:#86b9ff88;background:#16314f}
html body.cm-platform-page #cmlDialog .cml-strip-chip>span{font-size:11px;letter-spacing:.03em;text-transform:uppercase;color:#a9c4e4!important;-webkit-text-fill-color:#a9c4e4!important;flex:0 0 auto}
html body.cm-platform-page #cmlDialog .cml-strip-chip>b{font-weight:650;color:#f4f9ff!important;-webkit-text-fill-color:#f4f9ff!important;font-variant-numeric:tabular-nums;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body.cm-platform-page #cmlDialog .cml-strip-dx{flex:1 1 180px;min-width:0}
html body.cm-platform-page #cmlDialog .cml-strip-progress{cursor:default;background:#0e2136;border-color:#2dd4bf38}
html body.cm-platform-page #cmlDialog .cml-strip-alert{display:inline-flex;align-items:center;padding:1px 6px;border-radius:999px;font-size:11px;font-weight:700;background:#fb718529;border:1px solid #fb718580;color:#ffd5dc!important;-webkit-text-fill-color:#ffd5dc!important;flex:0 0 auto}
html body.cm-platform-page #cmlDialog .cml-strip-alert[data-strip-alert="yellow"]{background:#f59e0b26;border-color:#fbbf2478;color:#fde68a!important;-webkit-text-fill-color:#fde68a!important}
html body.cm-platform-page #cmlDialog .cml-strip-present{margin-left:auto;min-height:36px!important;padding:6px 12px!important;font-size:12.5px!important}
@media(max-width:520px){
 html body.cm-platform-page #cmlDialog .cml-case-strip{gap:6px;padding:8px 10px}
 html body.cm-platform-page #cmlDialog .cml-strip-dx{flex:1 1 100%}
 html body.cm-platform-page #cmlDialog .cml-strip-present{margin-left:0}
}
@media print{html body.cm-platform-page #cmlDialog .cml-case-strip{display:none!important}}

/* R7.17: Clinic queue filter bar & Command Palette (Cmd+K / Ctrl+K). */
.cm-clinic-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:0 0 10px}
.cm-clinic-pills{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.cm-filter-pill{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 11px;border-radius:999px;border:1px solid var(--line,rgba(8,15,24,.16));background:rgba(255,252,244,.75);color:var(--petro,#080f18);font-size:12.5px;font-weight:600;cursor:pointer}
.cm-filter-pill b{font-size:11.5px;padding:1px 6px;border-radius:999px;background:rgba(8,15,24,.08);font-variant-numeric:tabular-nums}
.cm-filter-pill.is-active{background:#0b1a2e;border-color:#2dd4bf99;color:#f1f7ff!important;-webkit-text-fill-color:#f1f7ff!important}
.cm-filter-pill.is-active b{background:#2dd4bf29;color:#9cf3e7!important;-webkit-text-fill-color:#9cf3e7!important}
.cm-cmd-trigger{width:auto!important;min-height:36px!important;padding:6px 12px!important;font-size:12px!important;margin:0!important}
dialog.cm-palette-dialog{width:min(620px,calc(100vw - 24px));max-width:620px;margin:min(10vh,72px) auto auto;padding:0;border:1px solid #9dcbff55;border-radius:22px;background:#0b192c;color:#f1f7ff;box-shadow:0 28px 70px rgba(2,8,18,.75)}
dialog.cm-palette-dialog::backdrop{background:rgba(3,9,18,.68);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.cm-palette-box{padding:16px;display:grid;gap:12px}
.cm-palette-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cm-palette-eyebrow{font-size:11px;letter-spacing:.08em;font-weight:700;color:#9ec5f3}
.cm-palette-close{min-height:30px;padding:4px 9px;border-radius:8px;border:1px solid #9ec5f338;background:#122640;color:#d6e7ff;font-size:11px;font-weight:700;cursor:pointer}
.cm-palette-input{width:100%;min-height:46px;padding:10px 14px;border-radius:14px;border:1px solid #86b9ff66;background:#10233b;color:#f5f9ff!important;-webkit-text-fill-color:#f5f9ff!important;font-size:15px}
.cm-palette-input::placeholder{color:#9ab6d8!important;-webkit-text-fill-color:#9ab6d8!important}
.cm-palette-results{max-height:min(54vh,420px);overflow-y:auto;display:grid;gap:4px;overscroll-behavior:contain}
.cm-palette-group{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#86b9ff;padding:8px 6px 2px}
.cm-palette-item{width:100%;display:grid;gap:2px;text-align:left;padding:10px 12px;border-radius:12px;border:1px solid transparent;background:transparent;color:#f1f7ff!important;-webkit-text-fill-color:#f1f7ff!important;cursor:pointer}
.cm-palette-item:hover,.cm-palette-item.is-selected{background:#152d4b;border-color:#86b9ff66}
.cm-palette-title{font-size:14.5px;font-weight:600;color:#f4f9ff!important;-webkit-text-fill-color:#f4f9ff!important}
.cm-palette-sub{font-size:12px;color:#b2c9e6!important;-webkit-text-fill-color:#b2c9e6!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cm-palette-empty{padding:18px 8px;text-align:center;color:#b2c9e6;font-size:13.5px}

/* R7.18: Clinic letterhead settings & preview styling. */
html body.cm-platform-page #cmlDialog .cml-letterhead-preview{border-left:3px solid #2dd4bf;background:#0d2138}
html body.cm-platform-page #cmlDialog .cml-letterhead-preview>b{display:block;font-size:15px;color:#f3f9ff!important;margin-bottom:2px}

/* R7.19: Visual trend sparklines & opt-in clinical snippet cards. */
html body.cm-platform-page #cmlDialog .cml-trends-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:10px;margin-top:10px}
html body.cm-platform-page #cmlDialog .cml-trend-card{padding:11px 12px;border-radius:14px;border:1px solid #9dc6f336;background:#0d1f34;display:grid;gap:6px;min-width:0}
html body.cm-platform-page #cmlDialog .cml-trend-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
html body.cm-platform-page #cmlDialog .cml-trend-head>b{font-size:13px;color:#eff6ff!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body.cm-platform-page #cmlDialog .cml-trend-head>small{font-size:11px;color:#9eb9da!important;flex:0 0 auto}
html body.cm-platform-page #cmlDialog .cml-sparkline{width:100%;height:28px;display:block}
html body.cm-platform-page #cmlDialog .cml-trend-vals{display:flex;align-items:baseline;justify-content:space-between;gap:6px;font-size:12px;color:#cfe2f8!important;font-variant-numeric:tabular-nums}
html body.cm-platform-page #cmlDialog .cml-trend-vals strong{color:#f5f9ff!important;font-weight:700}
html body.cm-platform-page #cmlDialog .cml-trend-vals small{color:#9eb9da!important}
html body.cm-platform-page #cmlDialog .cml-snippets-box{margin-top:10px}

/* R7.21: Multi-user Clinic Ops modal (Agenda, Queue, RBAC Team & Clinic Settings). */
.cm-clinic-toolbar-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
dialog.cm-clinic-ops-dialog{width:min(760px,calc(100vw - 24px));max-width:760px;max-height:90dvh;margin:auto;padding:0;border:1px solid #9dcbff55;border-radius:22px;background:#0b192c;color:#f1f7ff;box-shadow:0 28px 70px rgba(2,8,18,.78)}
dialog.cm-clinic-ops-dialog::backdrop{background:rgba(3,9,18,.7);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.cm-ops-shell{padding:18px;display:grid;gap:14px;max-height:90dvh;overflow-y:auto}
.cm-ops-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.cm-ops-head h2{margin:4px 0 2px;font-size:20px;color:#f5f9ff!important}
.cm-ops-tabs{display:flex;flex-wrap:wrap;gap:6px}
.cm-ops-status{padding:10px 12px;border-radius:12px;background:#132a45;border:1px solid #2dd4bf66;color:#d6f7f1!important;font-size:13px}
.cm-ops-bar{display:grid;gap:10px}
.cm-ops-bar label,.cm-ops-grid label{display:grid;gap:5px;font-size:12.5px;color:#c9ddf5!important}
.cm-ops-bar input,.cm-ops-grid input,.cm-ops-grid select{min-height:42px;padding:8px 11px;border-radius:11px;border:1px solid #9cc4ef45;background:#10233b;color:#f4f9ff!important;-webkit-text-fill-color:#f4f9ff!important;font-size:14px}
.cm-ops-kpis{display:flex;flex-wrap:wrap;gap:8px}
.cm-ops-kpis>span{padding:6px 10px;border-radius:10px;background:#10233b;border:1px solid #9cc4ef30;font-size:12px;color:#c9ddf5!important}
.cm-ops-kpis b{color:#f4f9ff!important;font-variant-numeric:tabular-nums}
.cm-ops-card{padding:14px;border-radius:16px;border:1px solid #9cc4ef36;background:#0e2036;display:grid;gap:10px}
.cm-ops-card summary{cursor:pointer;font-weight:650;color:#eef6ff!important;min-height:36px;display:flex;align-items:center}
.cm-ops-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}
.cm-ops-list{display:grid;gap:8px}
.cm-ops-row{padding:12px 14px;border-radius:14px;border:1px solid #9cc4ef30;background:#10233b;display:grid;gap:6px}
.cm-ops-row-top{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.cm-ops-row-top strong{font-size:14.5px;color:#f4f9ff!important}
.cm-ops-badge{font-size:11.5px;font-weight:700;padding:3px 9px;border-radius:999px;background:#1a3656;border:1px solid #86b9ff55;color:#dcecff!important}
.cm-ops-badge[data-status="triage"]{background:#0d3b38;border-color:#2dd4bf80;color:#9cf3e7!important}
.cm-ops-badge[data-status="in_progress"]{background:#3a2c10;border-color:#fbbf2480;color:#fde68a!important}
.cm-ops-badge[data-status="completed"]{background:#123828;border-color:#34d39970;color:#bbf7d0!important}
.cm-ops-note{font-size:12.5px;color:#b2c9e6!important;line-height:1.45}
.cm-ops-triage{font-size:13px;color:#e6f2ff!important;background:#0b192c;padding:8px 10px;border-radius:10px;border-left:2px solid #2dd4bf}
.cm-ops-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.cm-ops-matrix{display:grid;gap:6px;padding-left:18px;font-size:13px;color:#d6e6fa!important;line-height:1.45}

/* R8.0: Nursing triage handoff card inside encounter banner. */
html body.cm-platform-page #cmlDialog .cml-triage-handoff{border-left:3px solid #2dd4bf;background:#0c2238;margin:8px 0}


/* R8.2: Deterministic Clinical Safety Guardrails & CKD-EPI 2021 Renal Card (WCAG AA+ contrast on Safira). */
html body.cm-platform-page #cmlDialog .cml-renal-card{border-left:3px solid #2dd4bf;background:#0c2036;display:grid;gap:6px}
html body.cm-platform-page #cmlDialog .cml-renal-card[data-renal-state="warn"]{border-left-color:#fbbf24}
html body.cm-platform-page #cmlDialog .cml-renal-card[data-renal-state="critical"]{border-left-color:#fb7185}
html body.cm-platform-page #cmlDialog .cml-renal-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
html body.cm-platform-page #cmlDialog .cml-renal-row strong{font-size:18px;color:#f4f9ff!important;font-variant-numeric:tabular-nums}
html body.cm-platform-page #cmlDialog .cml-renal-stage{font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;background:#132e4a;border:1px solid #86b9ff55;color:#e5f2ff!important}
html body.cm-platform-page #cmlDialog .cml-safety-panel{display:grid;gap:10px;border:1px solid #fb718566;background:#121f33}
html body.cm-platform-page #cmlDialog .cml-safety-alert{padding:11px 13px;border-radius:13px;border-left:3px solid #fbbf24;background:#0b1829;display:grid;gap:4px}
html body.cm-platform-page #cmlDialog .cml-safety-alert[data-safety-severity="critical"]{border-left-color:#fb7185;background:#1b1624}
html body.cm-platform-page #cmlDialog .cml-safety-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
html body.cm-platform-page #cmlDialog .cml-safety-head strong{font-size:14px;color:#f6faff!important}
html body.cm-platform-page #cmlDialog .cml-safety-tag{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px;background:#fbbf2426;border:1px solid #fbbf2480;color:#fde68a!important}
html body.cm-platform-page #cmlDialog .cml-safety-alert[data-safety-severity="critical"] .cml-safety-tag{background:#fb71852b;border-color:#fb718599;color:#ffd8df!important}
html body.cm-platform-page #cmlDialog .cml-safety-alert p{margin:0;font-size:13.5px;line-height:1.5;color:#e6f0fc!important}

/* R8.3: Colored lab proposal cards with VN badge & native voice dictation trigger. */
html body.cm-platform-page #cmlDialog .cml-exam-proposal[data-cm649-state]{border-width:2px}
html body.cm-platform-page #cmlDialog .cml-exam-proposal[data-cm649-state="red"]{background:linear-gradient(145deg,#4b2634,#351d2c)!important;border-color:#efaaa3!important}
html body.cm-platform-page #cmlDialog .cml-exam-proposal[data-cm649-state="yellow"]{background:linear-gradient(145deg,#443820,#302819)!important;border-color:#e9c66d!important}
html body.cm-platform-page #cmlDialog .cml-exam-proposal[data-cm649-state="green"]{background:linear-gradient(145deg,#173d33,#102e29)!important;border-color:#78cfa8!important}
html body.cm-platform-page #cmlDialog .cml-proposal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:8px}
html body.cm-platform-page #cmlDialog .cml-proposal-vn{font-size:12px;font-weight:600;color:#d6e7fa!important;font-variant-numeric:tabular-nums}
html body.cm-platform-page #cmlDialog .cml-field-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
html body.cm-platform-page #cmlDialog .cml-voice-btn{min-height:32px!important;padding:4px 10px!important;font-size:12px!important}
html body.cm-platform-page #cmlDialog .cml-voice-btn[aria-pressed="true"]{background:#4b2634!important;border-color:#fb7185!important;color:#ffd8df!important}

/* R8.5 · Flow Studio Ultra-Clean Platform Polish (Safira obsidian + frosted pills + compact AI status pill). */
html body.cm-platform-page #cmlDialog.cml {
  border-radius: 26px !important;
  border: 1px solid rgba(186, 214, 250, 0.16) !important;
  background:
    radial-gradient(85% 45% at 50% -10%, rgba(110, 174, 255, 0.14), transparent 65%),
    linear-gradient(180deg, #071120 0%, #091628 100%) !important;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.82) !important;
}

html body.cm-platform-page #cmlDialog.cml .cml-dialog-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 17, 32, 0.84) !important;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid rgba(186, 214, 250, 0.12) !important;
}

/* Replace giant 240px black AI loading block with sleek Google Flow frosted status pill */
html body.cm-platform-page #cmlDialog.cml .cm-study-glass {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 54px !important;
  margin: 10px 0 12px !important;
  padding: 12px 18px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(134, 185, 255, 0.34) !important;
  background: linear-gradient(135deg, rgba(16, 33, 56, 0.92), rgba(11, 22, 38, 0.94)) !important;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

html body.cm-platform-page #cmlDialog.cml .cm-study-glass canvas {
  display: none !important;
}

html body.cm-platform-page #cmlDialog.cml .cm-study-glass-message {
  margin: 0 !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  color: #eef6ff !important;
  -webkit-text-fill-color: #eef6ff !important;
}

html body.cm-platform-page #cmlDialog.cml .cm-study-setup {
  padding: 12px 14px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(186, 214, 250, 0.16) !important;
  background: rgba(12, 24, 42, 0.72) !important;
}

html body.cm-platform-page #cmlDialog.cml .cm-study-setup-summary {
  font-size: 14px !important;
  font-weight: 650 !important;
  color: #e6f1ff !important;
  min-height: 36px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

html body.cm-platform-page #cmlDialog.cml #icuStudyExplanation {
  margin-top: 8px;
}

html body.cm-platform-page #cmlDialog.cml #icuStudyReport.cml-reading {
  font-size: 15.5px;
  line-height: 1.66;
  color: #f0f6ff;
}

html body.cm-platform-page #cmlDialog.cml #icuStudyReport h3 {
  margin: 18px 0 8px;
  font-size: 16.5px;
  letter-spacing: -0.015em;
  color: #9ec9ff;
}

/* Crisp pill buttons & cleaner cards across the 6 stages */
html body.cm-platform-page #cmlDialog.cml .cml-primary {
  border-radius: 999px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

html body.cm-platform-page #cmlDialog.cml .cml-quiet {
  border-radius: 999px !important;
}

html body.cm-platform-page #cmlDialog.cml .cml-stepper {
  border-radius: 999px !important;
  padding: 5px !important;
  background: rgba(8, 18, 33, 0.78) !important;
  border: 1px solid rgba(186, 214, 250, 0.14) !important;
}

html body.cm-platform-page #cmlDialog.cml .cml-stepper button {
  border-radius: 999px !important;
  min-height: 46px !important;
}

@media (max-width: 640px) {
  html body.cm-platform-page #cmlDialog.cml {
    border-radius: 20px 20px 0 0 !important;
  }
  html body.cm-platform-page #cmlDialog.cml .cml-stepper {
    border-radius: 18px !important;
  }
}


/* ═══ R8.6 · Plataforma Ultra-Premium Polish (Auth, Search, Filter Pills, Floating iOS Dock & Tabular Precision) ═══
   Preserva integralmente Liquid Glass safira e bordas dinâmicas (.aura::before, .cmc-moving-rim). */

/* 1. Auth screen (#auth) — deep atmospheric polish keeping .glass.aura dynamic border radiant */
html body.cm-platform-page #auth {
  color: #f1f7ff;
}

html body.cm-platform-page #auth .eyebrow.lux {
  color: #9ec5f3 !important;
  letter-spacing: 0.22em;
  text-align: center;
}

html body.cm-platform-page #auth #authTitle {
  color: #f6faff !important;
  letter-spacing: -0.025em;
}

html body.cm-platform-page #auth .field label {
  color: #cde0f7 !important;
  font-size: 13px;
  font-weight: 600;
}

html body.cm-platform-page #auth input {
  background: rgba(9, 20, 36, 0.82) !important;
  border: 1px solid rgba(164, 201, 240, 0.28) !important;
  border-radius: 15px !important;
  color: #f5f9ff !important;
  -webkit-text-fill-color: #f5f9ff !important;
  min-height: 48px;
}

html body.cm-platform-page #auth input:focus-visible {
  border-color: #86b9ff !important;
  box-shadow: 0 0 0 3px rgba(134, 185, 255, 0.22) !important;
}

/* 2. Clinic Search & Filter Pills — unified dark frosted Safira (no beige background) */
html body.cm-platform-page #clinSearch,
html body.cm-platform-page .cm-clin-search-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 16px;
  margin-bottom: 14px;
  border-radius: 999px !important;
  border: 1px solid rgba(164, 201, 240, 0.26) !important;
  background: rgba(11, 23, 40, 0.84) !important;
  color: #f4f9ff !important;
  -webkit-text-fill-color: #f4f9ff !important;
  font-size: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

html body.cm-platform-page #clinSearch::placeholder {
  color: #9cb7d8 !important;
  -webkit-text-fill-color: #9cb7d8 !important;
}

html body.cm-platform-page #clinSearch:focus-visible {
  outline: none !important;
  border-color: #86b9ff !important;
  background: rgba(14, 30, 52, 0.92) !important;
  box-shadow: 0 0 0 3px rgba(134, 185, 255, 0.2) !important;
}

html body.cm-platform-page .cm-filter-pill {
  background: rgba(13, 27, 46, 0.82) !important;
  border: 1px solid rgba(164, 201, 240, 0.22) !important;
  color: #d8e7fa !important;
  -webkit-text-fill-color: #d8e7fa !important;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

html body.cm-platform-page .cm-filter-pill b {
  background: rgba(134, 185, 255, 0.16) !important;
  color: #eef6ff !important;
  -webkit-text-fill-color: #eef6ff !important;
}

html body.cm-platform-page .cm-filter-pill:hover {
  border-color: rgba(134, 185, 255, 0.5) !important;
  background: rgba(18, 37, 62, 0.9) !important;
}

html body.cm-platform-page .cm-filter-pill.is-active {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(134, 185, 255, 0.18)) !important;
  border-color: rgba(45, 212, 191, 0.72) !important;
  color: #f6fbff !important;
  -webkit-text-fill-color: #f6fbff !important;
}

/* 3. Patient List Row polish */
html body.cm-platform-page #patientList .cm-patient-row {
  border-radius: 20px !important;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

html body.cm-platform-page #patientList .cm-patient-row:hover {
  transform: translateY(-1px);
  border-color: rgba(134, 185, 255, 0.45) !important;
}

html body.cm-platform-page #patientList .cm-patient-row.cm-patient-current {
  border-color: rgba(45, 212, 191, 0.72) !important;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.3), 0 14px 30px -18px rgba(0, 0, 0, 0.8) !important;
}

/* 4. Floating Frosted iOS / Flow Studio Bottom Navigation Dock (#nav) */
html body.cm-platform-page #nav.nav {
  padding: 8px 10px max(10px, env(safe-area-inset-bottom)) !important;
  background: rgba(6, 14, 26, 0.86) !important;
  border-top: 1px solid rgba(186, 214, 250, 0.16) !important;
  backdrop-filter: blur(24px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
  box-shadow: 0 -18px 46px -18px rgba(0, 0, 0, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

html body.cm-platform-page #nav.nav button {
  border-radius: 16px !important;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

html body.cm-platform-page #nav.nav button .i {
  border-radius: 12px !important;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

html body.cm-platform-page #nav.nav button.on .i {
  box-shadow: 0 6px 18px -6px rgba(231, 194, 126, 0.45) !important;
  transform: translateY(-1px);
}

/* 5. Tabular numbers & calm dark scrollbars across clinical inputs/outputs */
html body.cm-platform-page #cmlDialog :is(input[type="number"], input[inputmode="decimal"], time, .cma-value, .cml-summary-line span) {
  font-variant-numeric: tabular-nums;
}

html body.cm-platform-page #cmlDialog {
  scrollbar-color: rgba(134, 185, 255, 0.35) transparent;
}
