/* Dark Ocean: site-wide palette, from language choice to clinical documents. */
:root{
 --cm149-bg:#020913;--cm149-bg2:#061323;--cm149-petrol:#0a2038;--cm149-petrol-deep:#051222;
 --cm149-petrol-soft:#102a46;--cm149-petrol-bright:#183d60;
 --cm149-card:linear-gradient(145deg,#0b2038f2,#030d1bf7);--cm149-card-soft:linear-gradient(145deg,#142c46df,#061526f2);
 --cm-bg:#020913;--cm-bg2:#061323;--cm-petrol:#0a2038;--cm-petrol-deep:#051222;--cm-petrol-soft:#102a46;--cm-petrol2:#183d60;
 --petro:#0a2038;--petro-2:#163858;--petroleo:#0a2038;--petroleo-2:#163858;
 --cmc7-ocean:#020913;--cmc7-sapphire:#102b48;--cmc7-blue:#163858;
 --sc-bg:#061323;--sc-bg-2:#091b2e;
}
html,html:has(body.cm149-theme),html:has(body.cmc7-active){background:#020913!important;}
body,body.cm149-theme,body.cm149-theme.cm-platform-page.cmc7-active,body.cm149-theme.cm-diagnostic-page{
 background:radial-gradient(ellipse at 10% 0%,#102941 0,transparent 45%),radial-gradient(ellipse at 100% 85%,#091b30 0,transparent 50%),#020913!important;
 background-attachment:fixed!important;
}
body.cm149-theme{--cm149-card:linear-gradient(145deg,#0b2038f2,#030d1bf7);--cm149-card-soft:linear-gradient(145deg,#142c46df,#061526f2);}
body.cmc7{--cmc7-petrol:#0a2038;--cmc7-line:rgba(20,44,68,.16);}
body.cmc7-active :is(#cmc7Sidebar,#cmc7Toolbar,#cmc7Dock){
 background:linear-gradient(145deg,#29425b77,#051323ed 75%)!important;border-color:#b5c9e04d!important;
 box-shadow:inset 0 1px 0 #f5f9ff70,inset 0 -1px 0 #ffffff0a,0 12px 40px #00060fb0!important;
 -webkit-backdrop-filter:blur(28px) saturate(1.15);backdrop-filter:blur(28px) saturate(1.15);
}
body.cmc7 #app :is(.tile.t-petro,.btn-petro,.pi-next-button){background:linear-gradient(135deg,#173954,#05172b)!important;border-color:#55728f!important;}
body.cmc7 #pomo{background:radial-gradient(ellipse at 0 0,#112c47,transparent 60%),#020913!important;}
body.cmc7 #app #v-sala{background:transparent!important;}
body.cmc7 #app .sc-shell{--sc-bg:#061323;--sc-bg-2:#091b2e;--sc-txt:#f1f5fa;--sc-txt-2:#c4d0df;--sc-txt-3:#a9bfd5;}
body.cmc7 #app .sc-live{background:#091c30e8!important;border-radius:14px;margin:10px 20px!important;padding:12px 14px!important;}
body.cmc7 #app .sc-vt input{background:#0b223c!important;}
/* Rebuilt narrative composition uses the existing textarea, evidence controls and notes. */
body.cmc7 #app #scCorpo:has(#scNarra){padding:22px!important;background:linear-gradient(150deg,#fbf8f0,#eee9de)!important;border:1px solid #ffffffb0;border-radius:26px;box-shadow:0 16px 40px #00071224;}
body.cmc7 #app #scCorpo .sc-card:has(#scNarra){margin:0 0 20px!important;padding:24px!important;background:#fffdf6!important;border-color:#deddd5!important;box-shadow:0 8px 24px #11263c0a;}
body.cmc7 #app .sc-card:has(#scNarra)>.sc-eyebrow{font:650 25px/1.2 var(--sans)!important;letter-spacing:-.025em!important;text-transform:none!important;color:#15283b!important;margin-bottom:18px!important;}
body.cmc7 #app #scNarra{min-height:200px!important;background:#faf9f4!important;padding:18px!important;border-color:#bec9cf!important;box-shadow:inset 0 2px 5px #0c213809!important;}
body.cmc7 #app .sc-card:has(#scNarra) .sc-actions{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px!important;}
body.cmc7 #app .sc-card:has(#scNarra) .sc-actions .sc-btn{grid-column:span 2;min-height:84px!important;flex-direction:column!important;font:600 14px/1.25 var(--sans)!important;background:#f0f1ed!important;border-color:#d6dcde!important;box-shadow:inset 0 1px 0 #fff;}
body.cmc7 #app .sc-actions [data-sc=voz]{order:0;}
body.cmc7 #app .sc-actions [data-p0-action=camera]{order:1;}
body.cmc7 #app .sc-actions [data-p0-action=attach]{order:2;}
body.cmc7 #app .sc-card:has(#scNarra) .sc-actions :is([data-sc=exemplo],[data-sc=limpar]){order:3;grid-column:span 3;min-height:38px!important;background:transparent!important;border-color:transparent!important;}
body.cmc7 #app .sc-card:has(#scNarra) .sc-btn::before{content:'';display:block;width:24px;height:24px;background:currentColor;mask:var(--cm9-icon) center/contain no-repeat;-webkit-mask:var(--cm9-icon) center/contain no-repeat;}
body.cmc7 #app .sc-actions [data-sc=voz]{--cm9-icon:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cg fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round"%3E%3Crect x="9" y="2" width="6" height="13" rx="3"/%3E%3Cpath d="M5 10v2a7 7 0 0 0 14 0v-2M12 19v3m-4 0h8"/%3E%3C/g%3E%3C/svg%3E');}
body.cmc7 #app .sc-actions [data-p0-action=camera]{--cm9-icon:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cg fill="none" stroke="black" stroke-width="1.7"%3E%3Cpath d="M3 6h5l2-3h4l2 3h5v15H3z"/%3E%3Ccircle cx="12" cy="13" r="4"/%3E%3C/g%3E%3C/svg%3E');}
body.cmc7 #app .sc-actions [data-p0-action=attach]{--cm9-icon:url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"%3E%3Cpath d="m8 12 7-7a3 3 0 0 1 4 4L9 19a5 5 0 0 1-7-7L13 1M5 15l9-9" fill="none" stroke="black" stroke-width="1.7" stroke-linecap="round"/%3E%3C/svg%3E');}
body.cmc7 #app .sc-actions :is([data-sc=exemplo],[data-sc=limpar])::before{display:none!important;}
body.cmc7 #app .sc-card:has(#scNarra) .sc-note{color:#536474!important;background:transparent!important;padding:12px 0!important;border:0!important;line-height:1.5!important;}
body.cmc7 #app #scCorpo:has(#scNarra) :is(.sc-vitais,.sc-vt,.sc-q,.sc-prem,.sc-card:not(:has(#scNarra))){background:#0b2137!important;}
body.cmc7 #app #scCorpo:has(#scNarra)>.sc-sec span{color:#465d72!important;}
body.cmc7 #app #scCorpo:has(#scNarra)>.sc-sec .l{background:#c3ced6!important;}
body.cmc7 #app #scTabs{display:none!important;} /* Equivalent destinations in the seven-step navigation. */
#cm9ClinicalPath{margin:18px 0 16px;color:#edf3fa;}
.cm9-stage-label{display:flex;justify-content:space-between;font:600 14px/1.4 var(--sans);margin-bottom:10px;}
.cm9-stage-label small{font:500 12px/1.4 var(--sans);color:#b7c6d7;}
.cm9-stages{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;}
.cm9-stages button{appearance:none;min-width:0;min-height:58px;border:1px solid #a6c1dc35;border-radius:12px;background:#9fb6d00a;color:#cbd7e5;padding:8px 4px;font:500 11px/1.3 var(--sans);cursor:pointer;position:relative;}
.cm9-step-number{display:block;font-size:13px;font-weight:650;margin-bottom:4px;}
.cm9-stages button[aria-current]{background:linear-gradient(135deg,#a4bed443,#748ea52b);border-color:#b7d2ed75;color:#fff4db;box-shadow:inset 0 1px 0 #fff6;}
.cm9-alert-count{position:absolute;top:2px;right:2px;color:#ffd579;font-size:10px;}
.cm9-module-links{display:flex;gap:6px;margin-top:10px;}
.cm9-module-links button{flex:1;background:#05132477;border:1px solid #9db9d244;color:#dde7f2;font:500 12px/1.3 var(--sans);border-radius:11px;min-height:38px;cursor:pointer;}
.cm9-next,.cm9-bottom-nav button{appearance:none;border:1px solid #b6995e;border-radius:15px;background:linear-gradient(135deg,#e6d3a0,#c3a35f);color:#192a38;font:650 16px/1.4 var(--sans);padding:16px 20px;min-height:54px;cursor:pointer;}
.cm9-next{width:100%;margin-top:10px;box-shadow:inset 0 1px 0 #fff8,0 5px 15px #ad874821;}
.cm9-bottom-nav{display:flex;gap:12px;padding:20px 28px;justify-content:flex-end;}
.cm9-bottom-nav button:first-child:not(:last-child){background:transparent;color:#e0e9f3;border-color:#8fa7c0;}
body.cmc7 #app .sc-shell[data-cm9-stage="1"]>.cm9-bottom-nav{display:none;}
@media(min-width:1000px){
 body.cmc7 #app:has(#v-sala:not(.hide)){background:transparent!important;border-color:#8da8c236;box-shadow:none;}
 body.cmc7 #app .sc-shell{padding-top:8px!important;}
 body.cmc7 #app #scCorpo:has(#scNarra){display:grid;grid-template-columns:minmax(0,1.4fr) minmax(240px,1fr);gap:20px;align-items:start;}
 body.cmc7 #app #scCorpo>.sc-card:has(#scNarra){grid-column:1;grid-row:1 / span 3;position:sticky;top:112px;}
 body.cmc7 #app #scCorpo:has(#scNarra)>:not(.sc-card:has(#scNarra)){grid-column:2;}
 body.cmc7 #app #scCorpo:has(#scNarra) .sc-vitais{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-top:0!important;}
}
@media(max-width:999px){
 body.cmc7 #app .sc-top{padding:16px 16px 8px!important;}
 body.cmc7 #app .sc-pad{padding:0 14px!important;}
 body.cmc7 #app .sc-h{font-size:29px!important;}
 body.cmc7 #app .sc-live{margin:10px 14px!important;}
 body.cmc7 #app #scCorpo:has(#scNarra){padding:12px!important;border-radius:26px!important;margin-left:-4px;margin-right:-4px;}
 body.cmc7 #app #scCorpo .sc-card:has(#scNarra){padding:20px 16px!important;}
 body.cmc7 #app .sc-card:has(#scNarra)>.sc-eyebrow{font-size:23px!important;}
 body.cmc7 #app #scNarra{min-height:176px!important;font-size:16px!important;}
 .cm9-stages button{min-height:33px;padding:5px 0;border-radius:8px;}
 .cm9-stages button>span:not(.cm9-step-number){display:none;}
 .cm9-step-number{margin:0;font-size:12px;}
 .cm9-module-links button{min-height:36px;}
 .cm9-bottom-nav{padding:18px 14px;}
 .cm9-bottom-nav button{flex:1;font-size:14px;padding:12px;}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;}}
@media(prefers-reduced-transparency:reduce){body.cmc7-active :is(#cmc7Sidebar,#cmc7Toolbar,#cmc7Dock){background:#061323!important;backdrop-filter:none!important;}}
/* Entrance: a clear hook, then the existing diagnosis / platform / book actions. */
html body.cm149-theme.cm-gateway-page .cm-language-gate{background:radial-gradient(ellipse at 50% 0%,#132d48,transparent 65%),#020913!important;}
html body.cm149-theme.cm-gateway-page .cm-language-card{background:linear-gradient(145deg,#122a43dd,#051120f5)!important;border-color:#abc5e14d!important;box-shadow:inset 0 1px 0 #fff5,0 35px 90px #0008!important;border-radius:30px!important;}
html body.cm149-theme.cm-gateway-page .cm-language-options button{background:#18324d70!important;border-color:#acc6df40!important;border-radius:18px!important;min-height:76px;}
html body.cm149-theme.cm-gateway-page .cm-profile-lead{font-size:clamp(27px,6vw,36px)!important;line-height:1.15!important;font-weight:650!important;letter-spacing:-.035em!important;color:#fbf7ed!important;max-width:420px;}
html body.cm149-theme.cm-gateway-page .cm-profile-copy{font-size:16px!important;line-height:1.55!important;color:#bdccdc!important;}
html body.cm149-theme.cm-gateway-page .cm-action-card{border-radius:24px!important;transition:transform .18s,box-shadow .18s;}
html body.cm149-theme.cm-gateway-page .cm-action-primary{background:linear-gradient(135deg,#e4d09d,#c5a362)!important;color:#182a3d!important;border-color:#e1c891!important;}
html body.cm149-theme.cm-gateway-page .cm-action-primary :is(strong,p,.cm-action-icon,.cm-badge){color:#182a3d!important;-webkit-text-fill-color:currentColor!important;}
html body.cm149-theme.cm-gateway-page .cm-action-primary .cm-action-icon{background:#fff4!important;}
html body.cm149-theme.cm-gateway-page .cm-action-primary .cm-action-icon svg{fill:#182a3d!important;}
@media(hover:hover){html body.cm149-theme.cm-gateway-page .cm-action-card:hover{transform:translateY(-3px);box-shadow:inset 0 1px 0 #fff7,0 18px 40px #0008!important;}}
body.cmc7 #app #scCorpo:has(#scNarra) .sc-vt.c{background:var(--sc-crit-bg)!important;}
body.cmc7 #app #scCorpo:has(#scNarra) .sc-vt.w{background:var(--sc-warn-bg)!important;}
body.cmc7 #app #scCorpo:has(#scNarra) .sc-card.crit{background:var(--sc-crit-bg)!important;}
body.cmc7 #app #scCorpo:has(#scNarra) .sc-card.warn{background:var(--sc-warn-bg)!important;}
html body.cm149-theme.cm-gateway-page .cm-action-primary .cm-badge{background:#fff7!important;box-shadow:none!important;}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;}}
/* Administrative panels share the ocean surfaces; semantic status rows retain their colors. */
html body:has(.login-shell) .login-card,
html body:has(.dashboard-top) :is(.glass,.dashboard-top,.system-strip,.activity-card,.compact-card,.chart-card,.projection-card,.kpi,.admin-exclusion-strip,.block,.card,.audit-stats div,.activity-row,.funnel-bar,.rank-track){background:linear-gradient(145deg,#10283feF,#061323f5 65%,#0a2038f0)!important;}
