/* Workspace refinements: screen UI only. Paper content remains unabridged. */
@media screen {
html[data-app-layout="wide"]{--po-tools-height:48px}
html[data-app-layout="wide"] body .app.po-app{padding-top:calc(var(--po-header-height) + var(--po-tools-height))!important}
html[data-app-layout="wide"] body .po-app .v4m-root{top:calc(var(--localbar-height,0px) + var(--po-header-height) + var(--po-tools-height))!important;height:calc(100dvh - var(--localbar-height,0px) - var(--po-header-height) - var(--po-tools-height))!important}
.po-workspace-tools{position:fixed;top:calc(var(--localbar-height,0px) + var(--po-header-height));left:var(--po-sidebar-width,0px);right:0;height:var(--po-tools-height);display:flex;justify-content:flex-end;align-items:center;gap:18px;padding:5px clamp(12px,2vw,28px);box-sizing:border-box;background:#f8fbf9;border-bottom:1px solid #dce8e1;z-index:145;font-family:Inter,system-ui,sans-serif}
.po-workspace-tools .po-font-control{display:flex;align-items:center;gap:3px;margin:0}
.po-font-control>span{font-size:11px;color:#51695c;margin-right:6px}
.po-workspace-tools .po-font-control button{min-width:33px;height:31px;padding:0 8px;border:1px solid #dce6e0;border-radius:7px;background:white;color:#344f40;font:600 12px Inter,system-ui,sans-serif;cursor:pointer}
.po-workspace-tools button:disabled{opacity:.45;cursor:default}
.po-history-shortcut{display:flex;align-items:center;justify-content:center;gap:8px;min-height:34px;padding:0 14px;border:1px solid var(--v4-primary,#087954);border-radius:9px;background:var(--v4-primary,#087954);color:white;font:650 12px Inter,system-ui,sans-serif;cursor:pointer;box-shadow:0 2px 6px #16382715}
.po-history-shortcut b{padding:2px 6px;border-radius:20px;background:#ffffff26;font-size:10px}
.po-account-settings{display:grid!important;place-items:center;cursor:pointer}
html[data-app-layout="wide"] body .preview-paper{position:relative!important;top:auto!important;height:auto!important;max-height:none!important;overflow:visible!important;flex-shrink:0;box-sizing:border-box;min-width:0;overflow-wrap:anywhere}
html[data-app-layout="wide"] body .preview-paper .preview-content{max-height:none!important;height:auto!important;overflow:visible!important;flex-shrink:0!important;display:block!important;overflow-wrap:anywhere}
html[data-app-layout="wide"] body .preview-paper .preview-content::after{display:none!important}
html[data-app-layout="wide"] body .preview-paper .preview-content :is(img,table){max-width:100%!important}
html[data-app-layout="wide"] body .preview-paper .preview-sign{position:relative!important;flex-shrink:0;margin-top:32px}
html[data-app-layout="wide"] body .print-right{min-width:0;overflow:visible!important;align-self:start}
html[data-app-layout="wide"] body .pcv2-inputs{grid-template-columns:minmax(110px,.6fr) minmax(150px,1.4fr)!important}
html[data-app-layout="wide"] body .pcv2-inputs .field:last-child{grid-column:auto!important}
.po-catalog-layer{position:fixed;inset:var(--localbar-height,0px) 0 0;z-index:400;display:flex;align-items:center;justify-content:center;padding:24px;box-sizing:border-box;isolation:isolate}
html[data-app-layout="wide"] body .po-catalog-layer>.modal-overlay{position:absolute!important;inset:0!important;z-index:-1!important;background:#0d2227aa;backdrop-filter:blur(5px)}
html[data-app-layout="wide"] body .po-catalog-layer>.ped-catalog-modal{position:relative!important;inset:auto!important;transform:none!important;zoom:1!important;z-index:auto!important;width:min(1080px,100%)!important;height:auto!important;max-width:100%!important;max-height:100%!important;margin:0!important;border-radius:20px!important;display:flex;flex-direction:column;box-shadow:0 24px 80px #071b2950}
.po-catalog-layer .modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.po-catalog-layer .modal-header,.po-catalog-layer .modal-footer{flex-shrink:0}
.po-catalog-layer .ped-catalog-toolbar{position:sticky;top:0;z-index:2;background:var(--surface,#fff);padding:10px 0}
.po-catalog-layer .ped-catalog-item{padding:16px;border-radius:12px;margin-bottom:9px;border:1px solid #e2e7eb}
html[data-app-layout="wide"] body .history-overlay{z-index:180;background:#0d242766;backdrop-filter:blur(3px)}
html[data-app-layout="wide"] body .history-drawer{z-index:181;width:min(430px,100vw)!important;top:var(--localbar-height,0px)!important;max-height:calc(100dvh - var(--localbar-height,0px))!important;background:#f6f9f7;border-left:1px solid #dae6df;color:#243e30;font-family:Inter,system-ui,sans-serif}
html[data-app-layout="wide"] body .history-head{padding:24px 22px 20px;background:var(--v4-primary-soft,#e8f4ee);border-bottom:1px solid var(--v4-primary,#087954)}
html[data-app-layout="wide"] body .history-eyebrow{color:var(--v4-primary,#087954);font-size:11px;letter-spacing:1.5px}
html[data-app-layout="wide"] body .history-title{font:700 23px/1.5 Inter,system-ui,sans-serif}
.po-history-filters{display:flex;gap:5px;padding:0 16px 14px;flex-wrap:wrap}
.po-history-filters button{border:1px solid #d5e2da;border-radius:20px;background:white;padding:7px 9px;font-size:11px;color:#4e6558;cursor:pointer}
.po-history-filters button[aria-pressed="true"]{background:var(--v4-primary,#087954);border-color:var(--v4-primary,#087954);color:white}
html[data-app-layout="wide"] body .history-list{padding:0 16px 20px;gap:12px}
html[data-app-layout="wide"] body .history-item{background:white;border:1px solid #dce6df;border-left:3px solid var(--v4-primary,#087954);border-radius:12px;padding:16px;box-shadow:0 2px 6px #18382905}
html[data-app-layout="wide"] body .history-paciente{font-size:15px;font-weight:700;line-height:1.5;color:#253e31}
html[data-app-layout="wide"] body .history-detail{font-size:12px;line-height:1.6;color:#52685b}
html[data-app-layout="wide"] body .history-btn-print{background:var(--v4-primary-soft,#e8f4ee);color:var(--v4-primary,#087954);border:1px solid var(--v4-primary,#087954);border-radius:8px;padding:8px 12px}
.po-confirm-backdrop{position:fixed;inset:0;z-index:15000;background:#081b25a8;backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px}
.po-confirm-dialog{width:min(420px,100%);box-sizing:border-box;background:white;border:1px solid #dfebe4;border-radius:22px;padding:30px;box-shadow:0 24px 80px #0004;color:#213d30;font-family:Inter,system-ui,sans-serif}
.po-confirm-icon{display:grid;place-items:center;width:55px;height:55px;border-radius:16px;background:#fceef0;color:#b44157;margin-bottom:20px}
.po-confirm-dialog h2{font-size:23px;margin:0 0 12px}.po-confirm-dialog p{font-size:14px;line-height:1.7;color:#63756b}
.po-confirm-actions{display:flex;gap:10px;margin-top:24px}.po-confirm-actions button{flex:1;padding:12px 10px;border:1px solid #d8e5dc;border-radius:10px;background:#f5f9f6;color:#304f3b;font-weight:600;cursor:pointer}.po-confirm-actions .po-confirm-danger{background:#a33149;color:white;border-color:#a33149}
html[data-app-layout="wide"] body .rename-view{overflow:visible!important;padding:0 0 40px!important}
html[data-app-layout="wide"] body .rename-toolbar-wrap{position:sticky!important;top:calc(var(--localbar-height,0px) + var(--po-header-height) + var(--po-tools-height));z-index:40;margin:0 -8px 22px;padding:16px 8px;background:#f8fbf9;border-bottom:1px solid #d8e6dd;box-shadow:0 8px 14px #233d2c06}
html[data-app-layout="wide"] body .rename-search{min-height:48px;border-radius:12px;border-color:#c9dbcf;color:#284535;box-shadow:none}
html[data-app-layout="wide"] body .rename-card{border-radius:14px;border:1px solid #dce7df;box-shadow:0 2px 8px #193c2805;margin-bottom:12px;overflow:hidden}
html[data-app-layout="wide"] body .rename-card-hd{padding:18px 20px}.rename-toolbar :is(input,select){font-family:inherit}
.po-onboarding-test{padding:10px 12px;background:#fff4e3;border:1px solid #e5c18a;border-radius:10px;font:12px/1.5 Inter,system-ui,sans-serif;color:#74501d;margin-bottom:18px}.po-onboarding-test p{margin:0 0 6px}.po-onboarding-test button{background:transparent;border:0;padding:2px 0;color:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
@media(max-width:600px){.po-workspace-tools{gap:10px;padding-inline:10px}.po-font-control>span{display:none}.po-history-shortcut{padding:0 11px}.po-catalog-layer{padding:10px}.po-catalog-layer .modal-header{padding:16px}.po-catalog-layer .ped-catalog-toolbar{flex-wrap:wrap}.po-catalog-layer .ped-catalog-search{min-width:0;width:100%}.po-confirm-dialog{padding:24px}html[data-app-layout="wide"] body .rename-search-wrap{min-width:0;flex-basis:100%}html[data-app-layout="wide"] body .rename-class-sel{width:100%}}
}
@media print{.po-workspace-tools,.po-confirm-backdrop,.po-catalog-layer{display:none!important}}
@media screen {
html[data-color-mode="dark"] body .po-workspace-tools{background:var(--night-surface);border-color:var(--night-border)}
html[data-color-mode="dark"] body .po-font-control>span{color:var(--night-muted)}
html[data-color-mode="dark"] body .po-history-shortcut{background:var(--v4-primary,#267858);color:white}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.po-confirm-dialog,.po-onboarding,.history-drawer,.history-item,.rename-toolbar-wrap,.av-cartao,.av-qr-alt,.av-nav-voltar,.ped-catalog-toolbar){background:var(--night-surface)!important;color:var(--night-text)!important;border-color:var(--night-border)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.po-confirm-dialog p,.po-onboarding :is(h2,p,label,span),.history-paciente,.history-detail,.history-empty,.history-time,.av-ou,.av-btn-texto,.av-cartao h2,.av-cartao p,.pt-empty-state p){color:var(--night-text)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.po-confirm-actions button,.po-history-filters button,.po-onboarding button,.po-onboarding input){background:var(--night-raised)!important;border-color:#486058!important;color:var(--night-text)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .po-onboarding button[style*="rgb"]{color:var(--night-text)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.history-head,.history-btn-print,.po-history-filters button[aria-pressed="true"]){background:var(--v4-primary-soft)!important;color:#daf5e8!important;border-color:var(--v4-primary)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .history-eyebrow{color:#cfebdc!important}
html[data-color-mode="dark"] body .po-confirm-actions .po-confirm-danger{background:#96344c!important;color:white!important;border-color:#bb5870!important}
html[data-color-mode="dark"] body .po-onboarding-test{background:#3b3220;border-color:#806a40;color:#f2d699}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.av-ou,.av-btn-texto,.gaso-lbl,.gaso-label,.card-name){color:var(--night-text)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.gaso-req-star,.req,[style*="color: rgb(220, 38, 38)"]):not(.preview-paper *){color:#ffa8b3!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .pt-cc-today{background:#254737!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .pt-cc-today .pt-cc-num{color:#e3f7e9!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .modal [style*="color: rgb(59, 130, 246)"]{color:#9fc9ff!important}
html[data-color-mode="dark"][data-app-layout="wide"] body button[style*="background: rgb(22, 163, 74)"]{background:#246b4b!important;color:white!important}
}
@media screen {
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.calc-crit-label,.calc-result-rec,.calc-result-mort,.calc-ref-row,.calc-ref-row span,.gcs-opt-ex,.calc-crit-desc,.calc-note){color:var(--night-text)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.calc-crit-letter,.gcs-opt-score,.calc-ref-title){background:var(--night-raised)!important;color:#c7e4d2!important;border-color:var(--night-border)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .calc-result-badge{background:#284c3b!important;color:#d5f1e1!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.po-app,.modal,.drawer) :is([style*="background: rgb(241, 245, 249)"],[style*="background: rgb(248, 250, 252)"],[style*="background: rgb(249, 250, 251)"],[style*="background: rgb(243, 244, 246)"]):not(.preview-paper,.preview-paper *){background:var(--night-raised)!important;color:var(--night-text)!important;border-color:var(--night-border)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.po-app,.modal) [style*="background: rgb(240, 253, 244)"]:not(.preview-paper *){background:#203d31!important;color:#ccedd9!important;border-color:#4c7059!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.po-app,.modal,.drawer) :is([style*="color: rgb(17, 24, 39)"],[style*="color: rgb(30, 41, 59)"],[style*="color: rgb(51, 65, 85)"],[style*="color: rgb(55, 65, 81)"],[style*="color: rgb(100, 116, 139)"],[style*="color: rgb(107, 114, 128)"]):not(.preview-paper,.preview-paper *){color:var(--night-text)!important}
}
@media screen {
/* Every application dialog covers navigation; nested catalogs keep their own layer. */
html[data-app-layout="wide"] body .modal-overlay{z-index:230!important}
html[data-app-layout="wide"] body .modal{z-index:231!important;top:calc(50% + var(--localbar-height,0px)/2)!important;max-height:calc(100dvh - var(--localbar-height,0px) - 28px)!important}
html[data-app-layout="wide"] body .print-right{display:block!important}
html[data-app-layout="wide"] body .po-catalog-layer>.modal-overlay{z-index:-1!important}
html[data-app-layout="wide"] body .po-catalog-layer>.ped-catalog-modal{top:auto!important;max-height:100%!important;z-index:auto!important}
@media(max-width:700px){html[data-app-layout="wide"] body .modal{top:calc(var(--localbar-height,0px) + 8px)!important;bottom:8px!important;left:8px!important;right:8px!important;width:calc(100% - 16px)!important;height:auto!important;max-height:calc(100dvh - var(--localbar-height,0px) - 16px)!important;border-radius:16px!important;transform:none!important}html[data-app-layout="wide"] body .print-modal-body{padding:16px!important;grid-template-columns:minmax(0,1fr)!important}html[data-app-layout="wide"] body .po-catalog-layer>.ped-catalog-modal{inset:auto!important;width:100%!important;max-height:100%!important}}
html[data-color-mode="dark"][data-app-layout="wide"] body .ped-catalog-meta .link-btn{color:#f0afd0!important}
}
@media screen {
html[data-color-mode="dark"][data-app-layout="wide"] body .cab-box--vazio .cab-box-btn{background:#e6b96d!important;color:#33230e!important;border-color:#e6b96d!important}
html[data-app-layout="wide"] body .cab-box>div{min-width:0}.cab-box--vazio .cab-box-nome,.cab-box--vazio .cab-box-sub{white-space:normal!important;overflow:visible!important}
@media(max-width:500px){html[data-app-layout="wide"] body .cab-box--vazio{flex-wrap:wrap;gap:12px}.cab-box--vazio .cab-box-btn{width:100%;justify-content:center}}
}
@media screen {
html[data-app-layout="wide"] body .history-drawer{z-index:181!important}
html[data-app-layout="wide"] body .history-overlay{z-index:180!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.av-escolha-txt,.pt-loading-msg){color:var(--night-muted)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .av-escolha-card em{background:#284b3b!important;color:#cfeada!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .calc-ref-row .calc-ref-score{color:#263930!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .calc-result-badge{background:color-mix(in srgb,var(--result-color,#267854) 65%,#101b20)!important;color:white!important}
html[data-color-mode="dark"][data-app-layout="wide"] body [style*="color: rgb(21, 128, 61)"]:not(.preview-paper *){color:#afe2bc!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .calc-ref-row .calc-ref-score[style]{color:#263930!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .po-onboarding button[aria-pressed="true"]{background:#254b3e!important;border-color:#7bd3ad!important;box-shadow:0 0 0 1px #7bd3ad}
html[data-color-mode="dark"][data-app-layout="wide"] body .po-onboarding .po-onboarding-primary{background:#227456!important;color:white!important;border-color:#5cb490!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .po-onboarding-paper div{color:#3e5362!important}
}
@media screen {
html[data-app-layout="wide"][data-navigation="sidebar"] body .history-drawer .history-title{color:#243e30!important}
html[data-app-layout="wide"][data-navigation="sidebar"] body .history-drawer .po-history-filters button[aria-pressed]{color:#405b4b!important}
html[data-app-layout="wide"][data-navigation="sidebar"] body .history-drawer .po-history-filters button[aria-pressed="true"]{color:white!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .history-drawer .history-title{color:#daece2!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .history-drawer .po-history-filters button[aria-pressed]{color:#daeade!important}
}
@media screen {
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.rename-apres-forma,.rename-dil-lbl,.rename-dil-txt){color:#c8e0ea!important}
}
@media screen {
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.pt-form-sec-hdr,.pt-turno-sub,.pt-form-section small){color:#c4d9cf!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .pt-check{background:var(--night-raised)!important;border-color:var(--night-border)!important;color:var(--night-text)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .modal :is([style*="background: var(--accent)"],[style*="background-color: var(--accent)"]){background:#277456!important;color:white!important}
}
@media screen {
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.gaso-diag-vals,.gaso-diag-vals strong,.gaso-section-title,.gaso-comp-lbl,.gaso-comp-val,.gaso-comp-porque,.gaso-passo-titulo,.gaso-passo-texto,.gaso-causas-intro,.gaso-causa-item,.gaso-ref-title,.gaso-ref-item,.gaso-ag-lbl,.gaso-ag-val,.gaso-ag-ref,.gaso-ag-interp,.gaso-ox-lbl,.gaso-ox-val){color:var(--night-text)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.gaso-ag-item,.gaso-ref-item){background:var(--night-raised)!important;border-color:var(--night-border)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.gaso-comp-tag-ok,.gaso-ag-badge-ok){background:#274c3b!important;color:#b9e9c9!important}
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.gaso-comp-tag-bad,.gaso-ag-badge-high){background:#53303a!important;color:#ffc0ce!important}
}
@media screen {
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.seg,.seg-btn){background:var(--night-raised)!important;color:#d6e6dc!important;border-color:var(--night-border)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .seg-btn.active{background:#55324a!important;color:#f8d4e7!important;border-color:#936081!important}
}
@media screen {
html[data-color-mode="dark"][data-app-layout="wide"] body :is(.atest-modelos-label,.atest-bloco-rot){color:var(--night-muted)!important}
html[data-color-mode="dark"][data-app-layout="wide"] body .history-drawer .history-head button.icon-btn{color:#d6e9dd!important}
}
