/* Only applied palettes override the existing sidebar. Documents and clinical states keep their colors. */
.clinic-theme-preview{padding:16px;border:1px solid #d3e0d7;border-radius:9px}
.clinic-theme-preview:not([style*="--clinic-nav-background"]){background:#064a2b;color:#e5f2ea}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav{background:transparent;color:#e5f2ea}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav-title{color:#d0ded5}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav:not(:disabled):not([aria-disabled="true"]):is(:hover,:focus-visible,.is-hover){background:#216343;color:#ffffff}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav.active:not(:disabled):not([aria-disabled="true"]){background:#287552;color:#ffffff;font-weight:700}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav.active:not(:disabled):not([aria-disabled="true"])::before{content:"";position:absolute;left:0;top:7px;bottom:7px;width:3px;border-radius:3px;background:#83d7a5}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav:focus-visible{outline:2px solid currentColor;outline-offset:-2px}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav:is(:disabled,[aria-disabled="true"]){background:transparent;color:#d0ded5;font-weight:500;cursor:not-allowed;opacity:1}
.clinic-theme-preview:not([style*="--clinic-nav-background"]) .nav:is(:disabled,[aria-disabled="true"])::before{display:none}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"]{
 background:var(--clinic-nav-background);
 color:var(--clinic-nav-text);
 border-color:var(--clinic-nav-border)
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .brand{border-bottom-color:var(--clinic-nav-border)}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .nav-title{color:var(--clinic-nav-muted)}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .brand-copy small{color:var(--clinic-nav-detail)!important}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] nav::-webkit-scrollbar-thumb{background:var(--clinic-nav-border)}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .nav,
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] #specialtyNav .nav:not(.active){
 background:transparent;
 color:var(--clinic-nav-text)
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .nav:not(:disabled):not([aria-disabled="true"]):is(:hover,:focus-visible,.is-hover),
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] #specialtyNav .nav:not(:disabled):not([aria-disabled="true"]):is(:hover,:focus-visible,.is-hover){
 background:var(--clinic-nav-hover);
 color:var(--clinic-nav-hover-text)
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .nav.active:not(:disabled):not([aria-disabled="true"]),
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] #specialtyNav .nav.active:not(:disabled):not([aria-disabled="true"]){
 background:var(--clinic-nav-selected);
 color:var(--clinic-nav-selected-text);
 font-weight:700
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .nav.active:not(:disabled):not([aria-disabled="true"])::before{
 content:"";
 position:absolute;
 left:0;
 top:7px;
 bottom:7px;
 width:3px;
 border-radius:3px;
 background:var(--clinic-nav-indicator)
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .logout{
 background:transparent;
 color:var(--clinic-nav-text);
 border-color:var(--clinic-nav-border)
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .logout:not(:disabled):not([aria-disabled="true"]):is(:hover,:focus-visible,.is-hover){
 background:var(--clinic-nav-hover);
 color:var(--clinic-nav-hover-text)
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] :is(.nav,.logout):focus-visible{
 outline:2px solid currentColor;
 outline-offset:-2px
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .nav:is(:disabled,[aria-disabled="true"]),
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] #specialtyNav .nav:is(:disabled,[aria-disabled="true"]),
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .logout:is(:disabled,[aria-disabled="true"]){
 background:transparent;
 color:var(--clinic-nav-muted);
 box-shadow:inset 0 0 0 1px var(--clinic-nav-border);
 font-weight:500;
 cursor:not-allowed;
 opacity:1
}
:is(.sidebar,.clinic-theme-preview)[style*="--clinic-nav-background"] .nav:is(:disabled,[aria-disabled="true"])::before{display:none}

/* Keep preview labels readable even when the actual sidebar is collapsed. */
.clinic-theme-preview .nav{font-size:13px;text-align:left;line-height:1.4}
.clinic-theme-preview .nav::first-letter{font-size:inherit}

/* Institutional accents across the authenticated interface. Semantic status tokens are unchanged. */
html[data-clinic-interface-theme="true"]{
 --nani-green-3:var(--accent);--nani-green-soft-2:var(--muted-bg);--ath-mint:var(--accent);--ath-lav:var(--accent-hover);--primary:var(--accent)
}
html[data-clinic-interface-theme="true"] :is(button,a,input,select,textarea):focus-visible{outline-color:var(--accent)}
html[data-clinic-interface-theme="true"] :is(input,select,textarea):focus{border-color:var(--accent)!important;box-shadow:0 0 0 3px var(--accent-soft)!important}
html[data-clinic-interface-theme="true"] :is(input[type="checkbox"],input[type="radio"]){accent-color:var(--accent)}
html[data-clinic-interface-theme="true"] .btn:not(.primary):not(.danger):not(.warning):not(.success){color:var(--accent-hover);border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .btn:not(.primary):not(.danger):not(.warning):not(.success):hover{background:var(--accent-soft)}
html[data-clinic-interface-theme="true"] .notif-count{background:var(--accent)!important;color:#fff}
html[data-clinic-interface-theme="true"] .notif-bell .notif-icon,
html[data-clinic-interface-theme="true"] .notif-bell:hover .notif-icon,
html[data-clinic-interface-theme="true"] .notif-bell:focus-visible .notif-icon{stroke:var(--accent)}
html[data-clinic-interface-theme="true"] .notif-dot{background:var(--accent)}
html[data-clinic-interface-theme="true"] .notif-item.read .notif-dot{background:#cbd5e1}
html[data-clinic-interface-theme="true"] .notif-dropdown .notif-action{background:var(--accent-soft);color:var(--accent-hover);border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .user-chip-avatar,
html[data-clinic-interface-theme="true"] .live-toast-icon{background:var(--accent-soft);color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] .nani-live-toast{border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .doctor-next-card{border-left-color:var(--accent)}
html[data-clinic-interface-theme="true"] .attention{border-left-color:var(--accent)}
html[data-clinic-interface-theme="true"] .specialty-principal{outline-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .patient-sidebar button:hover,
html[data-clinic-interface-theme="true"] .patient-folder.active .patient-count{background:var(--accent-soft);color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] :is(.icon,.folder-icon){color:var(--accent-hover);background:var(--accent-soft);border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .modal-card .hc-section h3:before{background:var(--accent)}
html[data-clinic-interface-theme="true"] #pageTitle{color:var(--text-primary)}
html[data-clinic-interface-theme="true"] :is(.clinic-branding-admin h3,.clinic-identity-panel h4){color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] .clinic-branding-status:not([data-kind="error"]){color:var(--text-secondary)}
html[data-clinic-interface-theme="true"] .clinic-branding-preview{background:var(--muted-bg);border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .encounter-order-actions .support-btn{color:var(--accent-hover);border-color:var(--accent-border);background:#fff}
html[data-clinic-interface-theme="true"] .encounter-order-actions .support-btn:hover{background:var(--accent-soft)}
html[data-clinic-interface-theme="true"] .encounter-finish-action{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}
html[data-clinic-interface-theme="true"] .encounter-finish-action:hover{background:var(--accent-hover)!important;border-color:var(--accent-hover)!important}
html[data-clinic-interface-theme="true"] .clinical-editor-topbar h1,
html[data-clinic-interface-theme="true"] .clinical-editor-previous h2,
html[data-clinic-interface-theme="true"] .clinical-unified-sheet :is(.hc-section>h3,.encounter-subsection-head>h3,#specialtyDynamic h3),
html[data-clinic-interface-theme="true"] .clinical-unified-index button{color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] .clinical-unified-index button:is(:hover,:focus-visible){background:var(--accent-soft);color:var(--accent-hover);outline-color:var(--accent)}
html[data-clinic-interface-theme="true"] .clinical-editor-window .clinical-unified-sheet .clinical-unified-header{border-color:var(--accent-border);border-top-color:var(--accent)}
html[data-clinic-interface-theme="true"] .clinical-unified-header .patient-meta b{color:var(--text-secondary)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet :is(.clinical-medical-vitals,.clinical-rx-capture,.clinical-origin-card){background:var(--muted-bg);border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet :is(.clinical-rx-capture h4,.clinical-origin-card h4,.clinical-origin-card summary){color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet :is(.clinical-origin-card small,.clinical-origin-vitals span){color:var(--text-secondary)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selector{border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selector-head h3,
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selector .clinical-service-group h4,
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selection h4{color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selector .clinical-service-group{background:var(--muted-bg);border-color:var(--border)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selector .clinical-service-option:hover{background:var(--accent-soft)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selector .clinical-service-option input[type="checkbox"]{accent-color:var(--accent)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selection{background:var(--accent-soft);border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .clinical-order-selection-count{background:#fff;color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet :is(.clinical-order-selected-list li,.clinical-order-selection-actions){border-top-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .registered-orders-family-head{background:var(--muted-bg);border-color:var(--accent-border)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .registered-orders-family-head h4{color:var(--accent-hover)}
html[data-clinic-interface-theme="true"] .clinical-unified-sheet .registered-orders-table th{background:var(--muted-bg);color:var(--text-secondary)}
