/* System Integration V2 UI polish: presentation-only, follows active CRM theme. */
html.wl-theme-active .content .wl-dashboard .wl-tabs button.selected,
html.wl-theme-active .content .wl-dashboard .wl-pills button.selected,
html.wl-theme-active .content .wl-dashboard button[aria-pressed="true"] {
 background:var(--wl-theme-primary)!important;color:var(--wl-theme-on-primary)!important;
 border-color:var(--wl-theme-primary)!important;box-shadow:none!important;
}
/* Use the selected primary palette for hover, not the accent (which can be beige/brown). */
@media (hover:hover) and (pointer:fine) {
 html.wl-theme-active .content .hr-card:not(:disabled):hover,
 html.wl-theme-active .content .wl-dashboard :is(.wl-tabs,.wl-pills) button:not(.selected):not(:disabled):hover,
 html.wl-theme-active .content :is(.hr-tabs,.fu-tabs,.fin-tabs,.fin-legacy-root-tabs) > button:not(.selected):not(.active):not(:disabled):hover {
  background:color-mix(in srgb,var(--wl-theme-primary) 14%,var(--wl-theme-surface) 86%)!important;
  color:var(--wl-v4-on-surface,var(--wl-theme-fg))!important;
  border-color:var(--wl-theme-primary)!important;
  box-shadow:0 0 0 1px var(--wl-theme-primary)!important;
 }
 html.wl-theme-active .content .hr-card:not(:disabled):hover :is(strong,small,h3,p) {color:var(--wl-v4-on-surface,var(--wl-theme-fg))!important}
}
/* Integration tabs and buttons: keep unselected surfaces neutral, selected state primary. */
html.wl-theme-active .content .si-wrap {color:var(--wl-v4-on-bg,var(--wl-theme-fg))!important}
html.wl-theme-active .content .si-wrap .si-card {background:var(--wl-theme-surface)!important;color:var(--wl-v4-on-surface,var(--wl-theme-fg))!important;border-color:var(--wl-theme-border)!important}
html.wl-theme-active .content .si-wrap .si-card :is(h3,label,p) {color:inherit!important}
html.wl-theme-active .content .si-wrap button:not(.selected):not(:disabled) {
 background:var(--wl-theme-surface)!important;color:var(--wl-v4-on-surface,var(--wl-theme-fg))!important;
 border-color:var(--wl-theme-border)!important;
}
html.wl-theme-active .content .si-wrap button.selected:not(:disabled) {
 background:var(--wl-theme-primary)!important;color:var(--wl-theme-on-primary)!important;
 border-color:var(--wl-theme-primary)!important;box-shadow:none!important;
}
@media (hover:hover) and (pointer:fine) {
 html.wl-theme-active .content .si-wrap button:not(.selected):not(:disabled):hover {
  background:color-mix(in srgb,var(--wl-theme-primary) 14%,var(--wl-theme-surface) 86%)!important;
  color:var(--wl-v4-on-surface,var(--wl-theme-fg))!important;
  border-color:var(--wl-theme-primary)!important;box-shadow:0 0 0 1px var(--wl-theme-primary)!important;
 }
 html.wl-theme-active .content .si-wrap button.selected:not(:disabled):hover {filter:brightness(1.08)}
}
html.wl-theme-active .content .si-wrap button:focus-visible {outline:2px solid var(--wl-theme-primary)!important;outline-offset:2px}
html.wl-theme-active .content .si-wrap :is(input,select,textarea) {background:var(--wl-theme-surface)!important;color:var(--wl-v4-on-surface,var(--wl-theme-fg))!important;border-color:var(--wl-theme-border)!important}
html.wl-theme-active .content .si-wrap textarea,.si-wrap .si-card textarea {display:block;box-sizing:border-box;width:100%;min-height:110px;resize:vertical;border:1px solid var(--wl-theme-border,#bac6d6);border-radius:6px;padding:10px;margin:6px 0 12px;font:inherit}
html.wl-theme-active .content .si-wrap :is(input,select,textarea):focus-visible {outline:2px solid var(--wl-theme-primary)!important;outline-offset:1px}
@media(prefers-reduced-motion:reduce){html.wl-theme-active .content .si-wrap button{transition:none!important}}
