/* Shared application identity and device-local light/night surfaces. */
:root{--app-button:#1d72c9;--app-accent:#1d72c9;--app-strong:#155b9f;--app-soft:#e7f0fb;--appearance-canvas:#f5f6f8;--appearance-panel:#fff;--appearance-raised:#f0f4f8;--appearance-ink:#17384b;--appearance-muted:#617789;--appearance-line:#d9e5ed}
:is(#page-lab-orders,#nav-lab-orders,[data-page="page-lab-orders"]){--app-button:#087868;--app-accent:#087868;--app-strong:#056354;--app-soft:#dff4ed}
:is(#page-supplies,#nav-supplies,[data-page="page-supplies"]){--app-button:#b75a3c;--app-accent:#b75a3c;--app-strong:#93452f;--app-soft:#f8e8e1}
:is(#page-esthetic-tools,#nav-esthetic-tools,[data-page="page-esthetic-tools"]){--app-button:#7457d6;--app-accent:#7457d6;--app-strong:#5d3d96;--app-soft:#f0ecff}
:is(#page-referrals,#nav-referrals,[data-page="page-referrals"]){--app-button:#7457b7;--app-accent:#7457b7;--app-strong:#5b3d94;--app-soft:#f1ecfb}
:is(#page-equipment,#nav-equipment,[data-page="page-equipment"]){--app-button:#526b83;--app-accent:#526b83;--app-strong:#38546c;--app-soft:#edf3f8}
:is(#page-waste,#nav-waste,[data-page="page-waste"]){--app-button:#287c68;--app-accent:#287c68;--app-strong:#205f50;--app-soft:#eaf7f2}
:is(#page-connections,#nav-connections,[data-page="page-connections"]){--app-button:#087b93;--app-accent:#087b93;--app-strong:#07596c;--app-soft:#e5f5f8}
:is(#page-alerts,#nav-alerts,[data-page="page-alerts"]){--app-button:#965700;--app-accent:#965700;--app-strong:#7a4700;--app-soft:#fff2df}
:is(#nav-discover,#nav-prestaciones-sociales,#page-prestaciones-sociales,[data-page="page-prestaciones-sociales"]){--app-button:#7457d6;--app-accent:#7457d6;--app-strong:#5d3d96;--app-soft:#f0ecff}
:is(#nav-habilitacion,#page-habilitacion,[data-page="page-habilitacion"]){--app-button:#14825c;--app-accent:#14825c;--app-strong:#096044;--app-soft:#e9f8ef}
@media screen{
 html body #screen-app .sidebar .sb-link[id].active{background:var(--app-soft)!important;color:var(--app-strong)!important}
 html body #screen-app .sidebar .sb-link[id] .si{color:var(--app-accent)!important;background-color:var(--app-soft)!important}
 html body #clinic-adaptive-header .adaptive-header-icon{color:var(--app-accent)!important;background:var(--app-soft)!important}
 html body #clinic-adaptive-header .adaptive-header-inner::before{background:linear-gradient(100deg,var(--app-soft),var(--appearance-panel))!important}
 html body #clinic-adaptive-header .adaptive-header-primary{background:var(--app-accent)!important;border-color:var(--app-accent)!important;color:#fff!important}
 html body #clinic-adaptive-header .adaptive-header-primary:hover{background:var(--app-strong)!important}
 #clinic-theme-toggle{position:fixed;left:16px;bottom:12px;z-index:3200;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;padding:10px 12px;border:1px solid var(--appearance-line);border-radius:12px;background:var(--appearance-panel);color:var(--appearance-ink);font:600 12px/1.4 'Plus Jakarta Sans',sans-serif;box-shadow:0 3px 14px #0713211a;cursor:pointer}
 #clinic-theme-toggle svg{width:19px;height:19px;flex:0 0 19px}
 #clinic-theme-toggle:focus-visible{outline:3px solid #59b8ff;outline-offset:3px}
 body :is(.order-brandbar,.production-shell .top) #clinic-theme-toggle{position:static;order:1;flex:0 0 auto;margin:0 0 0 8px;box-shadow:none}
 body.clinic-standalone-theme #clinic-theme-toggle{top:auto;bottom:16px;left:16px;right:auto}
 @media(max-width:768px){#clinic-theme-toggle{z-index:700;left:auto;right:61px;top:8px;bottom:auto;width:44px;padding:10px}#clinic-theme-toggle span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}}
 /* In-flow footer dock: both controls stay aligned without covering footer copy. */
 #clinic-display-controls{display:flex;align-items:stretch;justify-content:center;gap:8px;padding:8px 0 0;flex-shrink:0}
 #clinic-display-controls :is(#clinic-theme-toggle,#clinic-view-toggle){position:static;z-index:auto;display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:1;min-width:0;min-height:44px;margin:0;padding:10px 8px;border:1px solid var(--appearance-line);border-radius:12px;background:var(--appearance-panel);color:var(--appearance-ink);font:600 12px/1.4 'Plus Jakarta Sans',sans-serif;box-shadow:0 3px 14px #0713211a;cursor:pointer;white-space:nowrap}
 #clinic-display-controls #clinic-view-toggle[hidden]{display:none}
 #clinic-view-toggle svg{width:19px;height:19px;flex:0 0 19px}
 #clinic-view-toggle:focus-visible{outline:3px solid #59b8ff;outline-offset:3px}
 body.has-clinic-view-control #sidebar #sb-plan-badge-wrap{display:none!important}
 #sidebar.collapsed #clinic-display-controls{flex-direction:column}
 #sidebar.collapsed #clinic-display-controls button span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
 @media(max-width:768px){
  /* Header controls stay below form overlays (2000 and above). */
  #clinic-display-controls{position:fixed;z-index:700;right:61px;top:8px;padding:0;gap:8px}
  #clinic-display-controls :is(#clinic-theme-toggle,#clinic-view-toggle){flex:0 0 44px;width:44px;height:44px;padding:10px}
  #clinic-display-controls button span{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
  body.has-clinic-view-control #mob-topbar{padding-right:164px!important}
  body.has-clinic-view-control #mobile-page-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 }
 html[data-theme="dark"]{
  color-scheme:dark;--appearance-canvas:#0d1622;--appearance-panel:#172332;--appearance-raised:#203146;--appearance-ink:#e4edf7;--appearance-muted:#a9bdd1;--appearance-line:#34495f;--app-accent:#91c9ff;--app-strong:#cbe5ff;--app-soft:#203146;
  --ink:#e4edf7;--ink2:#cfdfed;--ink3:#a9bdd1;--ink4:#a9bdd1;--surface:#0d1622;--white:#172332;--border:#34495f;--sky:#203146;--teal:#91c9ff;--teal2:#1d72c9;--green:#72d5ab;--red:#ffaaa5;--gold:#e7c28e;
  --wash:#0d1622;--muted:#a9bdd1;--line:#34495f;--soft:#203146;--blue:#91c9ff;
  --clinic-record-surface:#0d1622;--clinic-record-card:#172332;--clinic-record-line:#34495f;--clinic-record-shadow:0 2px 8px #0003;
  --clinic-ui-blue:#91c9ff;--clinic-ui-ink:#e4edf7;--clinic-ui-muted:#a9bdd1;--clinic-ui-line:#34495f;
  --stitch-card:#172332;--stitch-soft:#203146;--stitch-track:#34495f;--stitch-primary:#72d5c0;--stitch-active:#b8b4ff;
  --st-bg:#0d1622;--st-ink:#e4edf7;--st-muted:#a9bdd1;--st-line:#34495f;--st-blue:#91c9ff;
  --sh:0 2px 12px #0003;--shl:0 20px 60px #0008;
 }
 html[data-theme="dark"] :is(#page-lab-orders,#nav-lab-orders,[data-page="page-lab-orders"]){--app-accent:#68d4b9;--app-strong:#99e8d3;--app-soft:#173d36}
 html[data-theme="dark"] :is(#page-supplies,#nav-supplies,[data-page="page-supplies"]){--app-accent:#efa58c;--app-strong:#ffc4ae;--app-soft:#422b29}
 html[data-theme="dark"] :is(#page-esthetic-tools,#nav-esthetic-tools,[data-page="page-esthetic-tools"],#page-referrals,#nav-referrals,[data-page="page-referrals"]){--app-accent:#bfadff;--app-strong:#d7ccff;--app-soft:#302744}
 html[data-theme="dark"] :is(#page-equipment,#nav-equipment,[data-page="page-equipment"]){--app-accent:#afc9e0;--app-strong:#d3e5f6;--app-soft:#25374a}
 html[data-theme="dark"] :is(#page-waste,#nav-waste,[data-page="page-waste"]){--app-accent:#83d3b5;--app-strong:#b0ebd5;--app-soft:#1c382f}
 html[data-theme="dark"] :is(#page-connections,#nav-connections,[data-page="page-connections"]){--app-accent:#70d1e4;--app-strong:#a3e4f0;--app-soft:#173940}
 html[data-theme="dark"] :is(#page-alerts,#nav-alerts,[data-page="page-alerts"]){--app-accent:#f6c46c;--app-strong:#ffe0a6;--app-soft:#3c3020}
 html[data-theme="dark"] :is(#nav-discover,#nav-prestaciones-sociales,#page-prestaciones-sociales,[data-page="page-prestaciones-sociales"]){--app-accent:#bfadff;--app-strong:#d7ccff;--app-soft:#302744}
 html[data-theme="dark"] :is(#nav-habilitacion,#page-habilitacion,[data-page="page-habilitacion"]){--app-accent:#83d3b5;--app-strong:#b0ebd5;--app-soft:#1c382f}
 html[data-theme="dark"] body{background:var(--appearance-canvas)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen,html[data-theme="dark"] body #screen-app.screen .main{background:var(--appearance-canvas)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body :is(#mob-topbar,.sb-foot,.pd-toolbar,.halo-period-shell,.halo-period-dropdown,.period-nav,.period-nav-label,.halo-period-label,.price-strip,.supplier-control,.review-provider,.order-dialog,.product-art){background-color:var(--appearance-panel)!important;background-image:none!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app #tabsbar-patients,html[data-theme="dark"] body #screen-app #pat-actions{background:var(--appearance-panel)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #mob-topbar :is(#mobile-page-title,#mobile-clinic-name),
 html[data-theme="dark"] body :is(#mobile-page-title,#mobile-clinic-name,.sb-brand-txt,.sb-mark-top,.sb-mark-bottom,.sb-brand strong,.pd-heading p){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body :is(.btn-primary,.clinic-halo-primary){background:#1d72c9!important;color:#fff!important;border-color:transparent!important}
 html[data-theme="dark"] body #screen-app.screen .page{--clinic-page-ink:#e4edf7;--clinic-page-muted:#a9bdd1;--clinic-page-line:#34495f;--pd-ink:#e4edf7;--pd-muted:#a9bdd1;--pd-line:#34495f;--pc-ink:#e4edf7;--pc-muted:#a9bdd1;--pc-line:#34495f;--pc-soft:#203146;background-color:var(--appearance-canvas)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body :is(.sidebar,.topbar,.mobile-topbar,.mob-topbar,.mob-tabbar,#mob-tabbar,#clinic-adaptive-header,.adaptive-header-inner,.clinic-account-popup,.clinic-agent-dialog,.clinic-table-tools,.management-toolbar,.tbl-toolbar,.modal,.modal-top,.modal-body,.modal-foot,.card,.management-kpi,.pd-stat,.pc-kpi,.pc-card,.bc-card,.lc-card,.bc-summary-card,.cpp-section,.conecta-scope-tabs,.cfg-nav,.cfg-content,.os-utab-bar,.tabsbar,.st-top,.st-card,.st-modal,.st-modal>header,.st-modal>footer){background-color:var(--appearance-panel)!important;background-image:none!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.stitch-patient-card,.stitch-lab-card,.stitch-coordination-card,table.stitch-directory-table>tbody>tr.stitch-directory-card){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body :is(.stitch-patient-card .pd-name,.stitch-directory-card>td:first-child,.stitch-coordination-card h3,.stitch-lab-card h3,.stitch-directory-card>td strong,.clinic-unified-heading h2,.pc-console h1,.pc-console h2,.pc-console h3,.management-kpi strong,.pd-stat strong,.pa-kpi strong,.bc-card h3,.lc-card h3){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page .stitch-patient-card :is(.stitch-patient-contact,.stitch-patient-place,.stitch-patient-contact>b,.stitch-patient-place>b){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page .stitch-patient-card :is(.pd-person small,.pd-person small button,.stitch-patient-contact>span){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body :is(.stitch-directory-card>td::before,.stitch-patient-contact>small,.stitch-patient-place>small,.stitch-directory-card small,.management-kpi small,.management-kpi em,.pc-console p,.pc-console small,.sidebar-account-copy small,.sb-grouplabel){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){background-color:var(--appearance-canvas)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body ::placeholder{color:#9aafc4!important;opacity:1}
 html[data-theme="dark"] body :is(.btn-ghost,.btn-secondary,.record-link-action,.act-btn,.os-utab,.secondary,.text-button,.order-return,.record-action-secondary,.stitch-summary,.pc-console button:not(.btn-primary),.bc-btn:not(.primary):not(.danger),.lc-btn:not(.primary):not(.danger)){background-color:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.clinic-card-action.stitch-directory-primary,.stitch-open-patient,.stitch-open-coordination,.stitch-open-olab,.record-action-primary,.btn-primary){background:#1d72c9!important;color:#fff!important;border-color:transparent!important}
 html[data-theme="dark"] body .clinic-card-action[data-clinic-ui-icon="trash"]{color:#ffaaa5!important}
 html[data-theme="dark"] body #clinic-adaptive-header .adaptive-header-primary{background:#1d72c9!important;border-color:#1d72c9!important;color:#fff!important}
 html[data-theme="dark"] body #clinic-adaptive-header[data-page="page-lab-orders"] .adaptive-header-primary{background:#087868!important;border-color:#087868!important}
 html[data-theme="dark"] body #clinic-adaptive-header[data-page="page-supplies"] .adaptive-header-primary{background:#93452f!important;border-color:#93452f!important}
 html[data-theme="dark"] body #clinic-adaptive-header[data-page="page-esthetic-tools"] .adaptive-header-primary{background:#7457d6!important;border-color:#7457d6!important}
 html[data-theme="dark"] body .sb-link{color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app .sidebar :is(#nav-lab-orders,#nav-supplies,#nav-referrals,#nav-radiology-orders,#nav-patients,#nav-equipment,#nav-waste,#nav-connections,#nav-discover,#nav-esthetic-tools,#nav-habilitacion,#nav-prestaciones-sociales).si,
 html[data-theme="dark"] body #screen-app .sidebar :is(#nav-lab-orders,#nav-supplies,#nav-referrals,#nav-radiology-orders,#nav-patients,#nav-equipment,#nav-waste,#nav-connections,#nav-discover,#nav-esthetic-tools,#nav-habilitacion,#nav-prestaciones-sociales) .si{background-color:var(--app-soft)!important;color:var(--app-accent)!important}
 html[data-theme="dark"] body :is(.stitch-olab-flow,.stitch-teeth,.pd-avatar,.coord-avatar,.stitch-status,.stitch-flow-track,.pc-sort,.pd-search,.page-header,.os-order-context,.liq-grp-head,.os-grp-head){background-color:var(--appearance-raised)!important;color:var(--appearance-muted)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(table:not(.stitch-directory-table) th,table:not(.stitch-directory-table) td){border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body table:not(.stitch-directory-table) th{background-color:var(--appearance-raised)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body table:not(.stitch-directory-table) td{background-color:var(--appearance-panel)!important;color:var(--appearance-ink)}
 html[data-theme="dark"] body :is(.pill.green,.badge.green,.record-status.success){background:#193e32!important;color:#9fe5bf!important}
 html[data-theme="dark"] body :is(.pill.yellow,.pill.orange,.record-status.warning){background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body :is(.pill.red,.record-status.danger){background:#47282f!important;color:#ffb7b7!important}
 html[data-theme="dark"] body :is(.pill.purple,.record-status.purple){background:#352b4e!important;color:#d2bfff!important}
 html[data-theme="dark"] body :is(.pill.gray,.record-status.gray){background:#29394b!important;color:#c4d2e2!important}
 /* Shell surfaces with legacy light-only colors. */
 html[data-theme="dark"] body #clinic-adaptive-header .adaptive-header-breadcrumb{color:var(--appearance-muted)!important}
 html[data-theme="dark"] body.clinic-minimal-preview #clinic-adaptive-header .adaptive-header-breadcrumb :is(b,strong),
 html[data-theme="dark"] body #clinic-adaptive-header .adaptive-header-breadcrumb :is(b,strong),
 html[data-theme="dark"] body.clinic-minimal-preview #topbar-breadcrumb strong{color:var(--app-accent)!important}
 html[data-theme="dark"] body #clinic-adaptive-header .adaptive-header-breadcrumb i{color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #sidebar .sb-foot>#sidebar-notifications,
 html[data-theme="dark"] body :is(#mob-more-sheet,#mob-add-sheet){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #sidebar-notification-count{background:var(--appearance-raised)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body .sidebar-notice-read{color:var(--app-accent)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(#mob-more-sheet,#mob-add-sheet) :is(.mob-sheet-title,.mob-sheet-section-label){color:var(--appearance-muted)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(#mob-more-sheet,#mob-add-sheet) .mob-sheet-btn{color:var(--appearance-ink)!important}
 html[data-theme="dark"] body :is(#mob-more-sheet,#mob-add-sheet) .mob-sheet-btn:is(:hover,:focus-visible,:active),
 html[data-theme="dark"] body #sidebar-notifications button:is(:hover,:focus-visible){background:var(--appearance-raised)!important}
 html[data-theme="dark"] body :is(.sidebar-notice-main,.sidebar-notice-read,.mob-sheet-btn):focus-visible{outline:2px solid var(--app-accent);outline-offset:-2px}
 /* Inicio: operational cards, NEXO panels and weekly agenda share night surfaces. */
 html[data-theme="dark"] body #page-dashboard :is(.home-metric,.home-week-agenda,.home-tomorrow-agenda,.home-attention,.home-recent,.home-financial-summary,.home-day-flow,.home-patient-finder,.home-patient-results,.home-quick-create,.home-agenda-status,.home-agenda-row,.home-agenda-loading,.home-agenda-empty,.nexo-create,.nexo-connection-card,.nexo-directory-card,.nexo-directory-detail,.nexo-network-node,.nexo-network-hub,.process-daily){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important;box-shadow:none!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-metric-copy strong,.home-card-title h3,.home-agenda-row>span>strong,.home-agenda-empty strong,.home-agenda-loading strong,.home-attention-row strong,.home-recent-row strong,.home-quick-copy strong,.home-quick-actions strong,.nexo-create h2,.nexo-section-heading h2,.nexo-wheel-info h3,.nexo-wordmark,.nexo-main-stat span,.nexo-work-stats dd,.nexo-network-counts dt,.nexo-directory-detail h4){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-metric-copy small,.home-agenda-heading small,.home-agenda-controls>label,.home-agenda-row>time small,.home-recent-row small,.home-recent-row em,.home-quick-actions em,.process-daily span,.nexo-create p,.nexo-connection-title p,.nexo-wheel-description,.nexo-wheel-info,.nexo-wheel-info small,.nexo-wheel-copy>p,.nexo-wheel-hint,.nexo-network-hint,.nexo-network-hub small,.nexo-directory-copy small,.nexo-directory-purpose,.nexo-directory-note,.nexo-work-stats dt,.nexo-work-progress>div,.nexo-work-progress small){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #page-dashboard :is(.nexo-wheel-eyebrow,.nexo-section-heading>div>span,.nexo-wheel-selection,.home-agenda-row>time,.nexo-directory-copy strong,.nexo-connection-title h3,.nexo-main-stat,.nexo-work-progress strong,.nexo-network-counts dd){color:var(--app-accent)!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-agenda-controls>button:not(.home-agenda-refresh),.home-agenda-empty button,.home-attention-row button,.home-quick-actions button,.home-patient-result,.home-patient-create,.nexo-network-actions button,.nexo-card-actions button:not(.nexo-primary-action),.nexo-showcase-controls button){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-agenda-days,.home-financial-metric,.nexo-work-stats>div,.nexo-network-counts>div){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #page-dashboard .home-agenda-day{color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #page-dashboard .home-agenda-day strong{color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #page-dashboard .home-agenda-day.is-selected{background:#1768ad!important;color:#fff!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-agenda-day:not(.is-selected),.home-agenda-row,.home-recent-row,.home-patient-result):is(:hover,:focus-visible){background:var(--appearance-raised)!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-card-title,.home-agenda-days,.home-agenda-controls>label,.home-attention-row,.home-recent-row,.home-agenda-row){border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-agenda-row .is-linked,.home-agenda-lab.is-success,.home-empty){background:#193e32!important;color:#9fe5bf!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-agenda-row .is-pending,.home-agenda-lab.is-warning,.nexo-stat-alert){background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body #page-dashboard .home-financial-metric.income strong{color:#9fe5bf!important}
 html[data-theme="dark"] body #page-dashboard :is(.home-financial-metric.expense,.home-financial-metric.balance) strong{color:#ffb7b7!important}
 html[data-theme="dark"] body #page-dashboard .home-financial-metric.active strong{color:#91c9ff!important}
 html[data-theme="dark"] body #page-dashboard .home-financial-metric.inactive strong{color:#f5d392!important}
 html[data-theme="dark"] body :is(.nexo-area-dialog,.nexo-detail-header,.home-report-sheet,.home-desktop-actions){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body .nexo-area-dialog :is(.nexo-connection-card,.nexo-directory-detail,.nexo-work-stats>div,.nexo-network-counts>div){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body .nexo-area-dialog :is(h3,h4,dt,dd,.nexo-main-stat,.nexo-main-stat span,.nexo-directory-copy strong){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body .nexo-area-dialog :is(p,small,.nexo-detail-header>span,.nexo-work-stats dt){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body .nexo-area-dialog :is(.nexo-detail-header button,.nexo-card-actions button,.nexo-showcase-controls button){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #page-dashboard .home-week-agenda .home-agenda-row>time{color:var(--app-accent)!important;background:transparent!important}
 html[data-theme="dark"] body #page-dashboard .home-week-agenda :is(.home-agenda-row,.home-agenda-row:hover,.home-agenda-row:focus-visible){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important}
 /* Shared directories and module workspaces: remove remaining light-only chrome. */
 html[data-theme="dark"] body #screen-app.screen .page :is(.clinic-unified-heading p,.clinic-unified-scroll>h3){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.clinic-unified-scroll h3,.bc-section-heading h3,.lc-section-head h3){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.compact-list-tools,.lab-directory-fields,.referrals-filter-fields,.referrals-filter-menu>summary,.coord-note,.rad-service-notice,.rad-search,.rad-kpi,.rad-table-card,.proc-workspace,.proc-empty,.bc-loading,.bc-empty,.bc-rad-card,.bc-rule,.lab-connections-loading,.lab-connections-empty,.lc-guide,.lc-summary-card){background:var(--appearance-panel)!important;background-image:none!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.compact-list-tools,.referrals-filter-fields,.lab-directory-fields) :is(input,select,button:not(.btn-primary),summary){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(#patients-count,#lab-orders-count-label,.coord-pagination,.coord-note,.stitch-state>small,.stitch-order-dates small,.stitch-patient-place small,.bc-section-heading p,.bc-summary-card small,.bc-summary-card span,.bc-identity p,.bc-rule small,.lc-summary-card small,.lc-summary-card span,.lc-section-head p,.lc-meta-line,.lc-guide-copy span){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.stitch-order-dates b,.bc-identity h4,.bc-rule strong,.bc-summary-card strong,.lc-summary-card strong,.lc-lab h4,.lc-guide-copy strong){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.stitch-countdown b,.bc-section-heading span){color:var(--app-accent)!important}
 html[data-theme="dark"] body #screen-app.screen .page .olab-overdue-note{color:#ffb7b7!important}
 html[data-theme="dark"] body #screen-app.screen .page .stitch-olab-flow>.stitch-flow-current{color:#c9baff!important}
 html[data-theme="dark"] body #screen-app.screen .page .stitch-state.is-sent .stitch-status{background:#193748!important;color:#9edbff!important}
 html[data-theme="dark"] body #screen-app.screen .page .stitch-state.is-production .stitch-status{background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page .stitch-state.is-dispatch .stitch-status{background:#352b4e!important;color:#d2bfff!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.stitch-state.is-received,.stitch-state.is-completed) .stitch-status{background:#193e32!important;color:#9fe5bf!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.coord-pagination,.rad-service-notice) :is(p,span){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.stitch-directory-table thead th,.stitch-directory-table tfoot td){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body :is(.process-dialog,.process-editor,.process-toolbar,.process-body,.process-editor footer,.quote-footer,.proc-dialog,.proc-dialog header,.rad-dialog,.rad-step,.rad-detail-section,.rad-dialog-foot){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(.process-body small,.process-body label,.proc-dialog small){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body :is(.bc-error,.lc-status.pending,.bc-pill.pending,.bc-pill.internal){background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body :is(.bc-pill,.bc-rad-meta span,.lc-stat,.lc-status.ended){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(.bc-pill.connected,.lc-status:not(.pending):not(.ended)){background:#193e32!important;color:#9fe5bf!important}
 html[data-theme="dark"] body .bc-pill.preferred{background:#193748!important;color:#9edbff!important}
 html[data-theme="dark"] body #screen-app.screen .page .clinic-unified-scroll{background:transparent!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.lc-detail,.lc-btn.danger,.bc-logo,.lc-summary-icon,.lc-lab-logo){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.lc-detail strong,.lc-card h4,.bc-rad-card h4){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.lc-detail small,.lc-card p,.lc-card .lc-meta-line span,.lc-guide-flow){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page .lc-btn.danger{color:#ffb7b7!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.lab-directory-toolbar,.clinic-halo-action-dock,.supply-order-filter,#supplies-tab-orders){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page .lab-directory-toolbar :is(summary,input,select,button:not(.btn-primary)){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.coord-heading p,.lab-directory-fields label,.referrals-filter-fields label,.referrals-filter-fields span,.stitch-patient-processes small,.stitch-coordination-card small,.pc-loading,.coord-pagination span){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page .clinic-record-heading .card-head h3{color:var(--appearance-ink)!important}
 /* Full plan: financial summaries, service orders and secondary workspaces. */
 html[data-theme="dark"] body #screen-app.screen .page :is(.clinic-table-tools,.management-table-wrap,.finance-table-wrap,.finance-period-note,.finance-balance-note,.cc-summary-group,.cc-summary-filter,.cc-pending-summary>div,.cc-pending-actions,.cc-payment-guidance,.cc-payment-archive,#os-group-tools,#cc-group-wrap,#ccp-cutoff-wrap,.esthetic-tool-card){background:var(--appearance-panel)!important;background-image:none!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.os-utab,.os-utab-active,.pc-status.pc-neutral,.clinic-record-shell .card-head){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.clinic-record-shell .card-head h3,.esthetic-tool-card strong,#os-sub-host-listado td){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.pc-kpi>span,.stitch-coordination-field em,#os-count-label,.finance-balance-note,.finance-period-note,.esthetic-tool-card small){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.pc-eyebrow,.esthetic-tool-card em){color:var(--app-accent)!important}
 html[data-theme="dark"] body #screen-app.screen .page .pc-status.pc-success{background:#193e32!important;color:#9fe5bf!important}
 html[data-theme="dark"] body #screen-app.screen .page .pc-status.pc-warning{background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page .pc-status.pc-danger{background:#47282f!important;color:#ffb7b7!important}
 html[data-theme="dark"] body #screen-app.screen .page .pc-status small{color:inherit!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) table :is(tr,td,th){background:var(--appearance-panel)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) table td{color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) table :is(td,div)[style*="7c3aed" i]{color:#cfb6ff!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) :is(td,div)[style*="0e8c5e" i]{color:#9fe5bf!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) div[style*="2563a8" i]{color:#91c9ff!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) div[style*="b83260" i]{color:#ffb7b7!important}
 html[data-theme="dark"] body #screen-app.screen #page-service-orders [style*="background:#fff9ed" i]{background:var(--appearance-raised)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen #page-service-orders .clinic-table-tools button{background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen #page-cuentas-cobro :is(.os-utab-active){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen #page-cuentas-cobro #badge-cc-enviadas{background:#47282f!important;color:#ffb7b7!important}
 html[data-theme="dark"] body #screen-app.screen #page-cuentas-cobro .cc-payment-guidance strong{color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen #page-esthetic-tools :is(h1,h2,h3,.esthetic-tool-card span){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen #page-esthetic-tools :is(p,small){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen #page-esthetic-tools .esthetic-tool-card{--esthetic-ink:var(--appearance-ink);--esthetic-muted:var(--appearance-muted)}
 html[data-theme="dark"] body :is(.st-alert,.hc-status){background:#44341d!important;color:#f5d392!important;border-color:#745c34!important}
 html[data-theme="dark"] body :is(.st-alert small,.hc-status b){color:inherit!important}
 html[data-theme="dark"] body :is(.st-pill,.st-tag,.st-radio,.hc-nav button,.hc-nav small,.hc-answer button,.hc-review,.hc-cancel,.hc-review-panel,.hc-review-panel>header,.hc-review-panel>footer,.hc-guide,.hc-auto-check,.hc-doc-box,.hc-observation,.hc-folder-map){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(.st-metric small,.st-metric span,.st-field,.st-check>span,.hc-hint,.hc-save,.hc-plan-row small,.hc-form label,.hc-guide p,.hc-guide li,.hc-auto-check p,.hc-doc-box p,.hc-repo-head p){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body :is(.st-pill.ok,.hc-result.ok,.hc-status.live,.hc-answer button.on[data-value=complies]){background:#193e32!important;color:#9fe5bf!important}
 html[data-theme="dark"] body :is(.st-pill.hold,.hc-result.pending){background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body :is(.st-pill.fail,.hc-result.gap,.hc-answer button.on[data-value=does_not_comply]){background:#47282f!important;color:#ffb7b7!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) :is(div,section,label)[style*="background:#fff" i]{background:var(--appearance-panel)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-service-orders,#page-cuentas-cobro,#page-liquidacion) span[style*="008b62" i]{color:#9fe5bf!important}
 html[data-theme="dark"] body .st-table-wrap table.st-table :is(tr,td,th){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"]{--assistant-paper:#172332;--assistant-ink:#e4edf7;--assistant-muted:#a9bdd1;--assistant-line:#34495f}
 html[data-theme="dark"] body #screen-app.screen .page :is(.survey-filters,.survey-metric,.survey-panel,.survey-empty,.labor-benefits-card,.labor-benefits-person-summary,.labor-benefits-total,.labor-benefits-meta>div,.labor-benefits-empty-result,.labor-benefits-alert,.labor-benefits-check,.labor-benefits-finance-source,.continuity-control,.continuity-search-shell,.continuity-select-shell,.continuity-record-card,.continuity-record-head,.continuity-record-actions,.continuity-record-finance>div,.continuity-last-followup){background:var(--appearance-panel)!important;background-image:none!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.survey-filters label,.survey-metric span,.survey-metric small,.survey-panel p,.survey-empty,.continuity-control-label){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.survey-metric strong,.survey-panel h3,.labor-benefits-total strong){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.labor-benefits-alert.warning,.labor-benefits-validation,.labor-benefits-finance-source.error){background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body #clinic-assistant-panel{background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"]{--clinic-table-body:#172332;--clinic-table-hover:#203146;--clinic-table-ink:#e4edf7;--clinic-table-muted:#a9bdd1}
 html[data-theme="dark"] body #screen-app.screen .page{--clinic-table-hover:#203146}
 html[data-theme="dark"] body #dentios-session-status{background:var(--appearance-canvas)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.os-card-sort button,.cc-summary-grid>div,#tabsbar-liquidacion){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.clinic-group-control span,.labor-benefits-total>span,.labor-benefits-meta span){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.labor-benefits-meta b,.finance-balance-note strong){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page #ccp-selected-intermediary{color:#cfb6ff!important}
 html[data-theme="dark"] body #screen-app.screen .page strong[style*="b45309" i]{color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page .pill.yellow{background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page .stitch-directory-table>tbody>tr.stitch-directory-detail{background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen #page-esthetic-tools span{color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen #page-esthetic-tools .esthetic-tool-icon{background:#352b4e!important;color:#d2bfff!important}
 html[data-theme="dark"] body #screen-app.screen #page-clinical-codes :is(.clinical-codes-workspace,.clinical-codes-search-card,.clinical-code-card,.clinical-code-link,.clinical-codes-tabs button,.clinical-codes-quick button,.clinical-codes-source,.clinical-code-copy,.clinical-code-readonly){background:var(--appearance-panel)!important;background-image:none!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen #page-clinical-codes :is(.clinical-code-copy code,.clinical-code-link){color:var(--app-accent)!important}
 html[data-theme="dark"] body #screen-app.screen #page-clinical-codes .clinical-code-readonly{color:var(--appearance-muted)!important}
 html[data-theme="dark"]{--clinic-record-summary:#203146}
 html[data-theme="dark"] [data-clinic-status-tone="neutral"]{--status-bg:#29394b;--status-ink:#c4d2e2}
 html[data-theme="dark"] [data-clinic-status-tone="info"]{--status-bg:#193748;--status-ink:#9edbff}
 html[data-theme="dark"] [data-clinic-status-tone="progress"]{--status-bg:#352b4e;--status-ink:#d2bfff}
 html[data-theme="dark"] [data-clinic-status-tone="warning"]{--status-bg:#44341d;--status-ink:#f5d392}
 html[data-theme="dark"] [data-clinic-status-tone="success"]{--status-bg:#193e32;--status-ink:#9fe5bf}
 html[data-theme="dark"] [data-clinic-status-tone="danger"]{--status-bg:#47282f;--status-ink:#ffb7b7}
 html[data-theme="dark"] body #screen-app.screen .page span[style*="b45309" i]{color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page .finance-period-note strong{color:var(--appearance-ink)!important}
 html[data-theme="dark"] body.clinic-habilitation :is(.top,.notice){background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body.clinic-habilitation :is(.notice>span,.metric .ico,.std>span,.deadline .cal){background:var(--appearance-raised)!important;color:var(--app-accent)!important}
 html[data-theme="dark"] body.clinic-habilitation :is(.hero p,.metric p,.metric small,.head p,.std p,.std small,.deadline p,.date small,.hc-empty,.notice p){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body.clinic-habilitation :is(.tabs button.active,.head a,.back){color:var(--app-accent)!important}
 html[data-theme="dark"] body.clinic-habilitation .tag.warn{background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body :is(.st-metric .icon){background:var(--appearance-raised)!important;color:var(--app-accent)!important}
 html[data-theme="dark"] body .st-alert>span{background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body.clinic-habilitation .ring::before,html[data-theme="dark"] body .st-step::before{background:var(--appearance-raised)!important;color:var(--app-accent)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.labor-benefits-meta small,.supply-order-filter span){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body #screen-app.screen #page-referrals #remglobal-table{background:var(--appearance-canvas)!important;color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen #page-radiology-orders .rad-kpi.rad-alert strong{color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.rad-status-issued,.rad-status-center_selected){background:#193748!important;color:#9edbff!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.rad-status-received,.rad-status-scheduled){background:#44341d!important;color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page .rad-status-performed{background:#352b4e!important;color:#d2bfff!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.rad-status-result_delivered,.rad-status-closed){background:#193e32!important;color:#9fe5bf!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.rad-status-cancelled,.rad-status-no_show){background:#47282f!important;color:#ffb7b7!important}
 html[data-theme="dark"] body #screen-app.screen .page .rad-status small{color:inherit!important}
 html[data-theme="dark"] body #screen-app.screen #page-clinical-codes .clinical-code-category{color:var(--app-accent)!important}
 html[data-theme="dark"] body #screen-app.screen .page :is(.period-nav-btn,.process-badge),
 html[data-theme="dark"] body :is(.period-nav-btn,.process-badge){background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen #page-liquidacion :is(#liq-origen,#liq-profesional){background:var(--appearance-canvas)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen #page-service-orders #os-table table.stitch-directory-table th{color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page .finance-stat-card{background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-cuentas-cobro,#page-liquidacion) table tbody{background:var(--appearance-panel)!important}
 html[data-theme="dark"] body #screen-app.screen :is(#page-cuentas-cobro,#page-liquidacion) div[style*="b7791f" i]{color:#f5d392!important}
 html[data-theme="dark"] body #screen-app.screen .page .finance-stat-card div[style*="7c3aed" i]{color:#cfb6ff!important}
 html[data-theme="dark"] body #screen-app.screen .page .finance-stat-card div[style*="475569" i]{color:var(--appearance-ink)!important}
 html[data-theme="dark"] body #screen-app.screen .page .finance-stat-card div[style*="be185d" i]{color:#ffb7d4!important}
 html[data-theme="dark"] body #screen-app.screen .page .clinic-table-viewport{background:var(--appearance-panel)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body>.page-table-scroll-rail,html[data-theme="dark"] body>.page-table-scroll-rail::-webkit-scrollbar-track{background:var(--appearance-raised)!important;scrollbar-color:#7089a3 #203146}
 html[data-theme="dark"] body>.page-table-scroll-rail::-webkit-scrollbar-thumb{background:#7089a3;border-color:var(--appearance-raised)}
 /* Standalone order builder: keep photographs, logos and clinical canvases untouched. */
 html[data-theme="dark"] body :is(.order-brandbar,.ordering-clinic,.production-shell .top,.production-shell .filters,.product-card,.product,.summary,.supplier-group,.discover-note,.external-dialog,.dialog-head,.image-dialog,.assign-supplier-dialog,.price-dialog,.order-dialog){background-color:var(--appearance-panel)!important;background-image:none!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(.product-card h3,.product h3,.order-brand strong,.ordering-clinic strong,.summary h2,.product-price,.summary-total strong){color:var(--appearance-ink)!important}
 html[data-theme="dark"] body .product :is(.sku,.presentation,.subtotal,.provider-control label,.supplier-control small){color:var(--appearance-muted)!important}
 html[data-theme="dark"] body .product .origin{color:#83d3b5!important}
 html[data-theme="dark"] body .production-shell .tabs button{background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body .production-shell .tabs button[aria-pressed="true"]{background:#1d72c9!important;color:#fff!important}
 html[data-theme="dark"] body .product .favorite{background:var(--appearance-raised)!important;color:var(--appearance-ink)!important;border-color:var(--appearance-line)!important}
 html[data-theme="dark"] body :is(.primary,.review,.st-btn.primary){background-color:#1d72c9!important;color:#fff!important}
 html[data-theme="dark"] body :is(.product-image,.product-photo,.order-brand img,.ordering-clinic-mark){background-color:#fff;border-radius:10px}
 html[data-theme="dark"] body .st-table :is(th,td){border-color:var(--appearance-line)!important}
}
@media print{#clinic-display-controls,#clinic-theme-toggle{display:none!important}html[data-theme="dark"]{color-scheme:light!important;--teal:#0f4c81;--green:#0e8c5e;--red:#a3503d;--gold:#8a6d45;--ink:#1c1c1e;--ink2:#334155;--ink3:#4b4b4f;--white:#fff;--surface:#fff;--border:#dce1e6;--appearance-ink:#1c1c1e;--appearance-muted:#4b4b4f;--appearance-canvas:#fff;--appearance-panel:#fff;--clinic-record-card:#fff;--clinic-record-surface:#fff;--clinic-record-line:#dce1e6;--st-bg:#fff;--st-ink:#25394f;--st-line:#dfe6ed}html[data-theme="dark"] body{background:#fff!important;color:#1c1c1e!important}}

/* Reserve space for the mobile appearance controls on the settings header. */
@media(max-width:768px){
 body:has(#page-settings.active) #screen-app #page-settings>.settings-record-header{display:grid!important;grid-template-columns:minmax(0,1fr);gap:12px;flex-wrap:wrap!important;overflow:visible!important;padding-right:112px;box-sizing:border-box}
 body:has(#page-settings.active) #page-settings>.settings-record-header h1{font-size:24px;line-height:1.2;margin:0;overflow-wrap:anywhere}
}
