/* Dark mode retains the existing APC styles. */
#apc-theme-control{position:fixed;right:16px;bottom:calc(14px + env(safe-area-inset-bottom,0px));z-index:9000;display:flex;gap:3px;padding:4px;background:#091727;border:1px solid #526a81;border-radius:11px;box-shadow:0 3px 16px #0004;font:600 13px/1.3 system-ui,-apple-system,sans-serif;width:auto;max-width:calc(100vw - 24px)}
#apc-theme-control button{display:block!important;width:auto!important;min-width:54px;min-height:36px;margin:0!important;padding:7px 10px!important;background:transparent!important;border:0!important;border-radius:7px!important;color:#fff!important;font:inherit!important;cursor:pointer}
#apc-theme-control button[aria-pressed="true"]{background:#d4af37!important;color:#071426!important}
#apc-theme-control button:focus-visible{outline:3px solid #fff;outline-offset:1px}

@media screen{
html[data-apc-theme="bright"],html[data-apc-theme="bright"] body,html[data-apc-theme="bright"] body:has(#portal){background:#b6c8d8!important}
#apc-theme-control{top:calc(12px + env(safe-area-inset-top,0px));right:16px;bottom:auto}
}
@media print{#apc-theme-control{display:none!important}}
:fullscreen #apc-theme-control{display:none!important}
/* Apply the page background to full-page workspace layers too. */
@media screen{html[data-apc-theme="bright"] :is(#app,.shell,.shell>.main,body>main,#portal,#admin,.msg-page,.medical-layout){background:#b6c8d8!important}}
/* Reserve a header row beneath the fixed top-right display switch. */
@media screen{.shell>.main>.top{padding-top:calc(58px + env(safe-area-inset-top,0px))}}