/* Theme V8: one final semantic visual layer, without changing CRM business handlers. */
html.wl-theme-active .content{color:var(--he8-bg-text)!important}
html.wl-theme-active .content :is(.wl-eyebrow,.wl-heading p,.fu-heading p,.hr-heading p,.pm-subtitle,.page-head p,.wl-kicker){color:var(--he8-bg-muted)!important;opacity:1!important}
/* Primary surface typography. Explicit descendants override hardcoded navy inherited from old modules. */
html.wl-theme-active .content :is(.wl-kpi,.wl-panel,.wl-report,.wl-filter,.wl-legend,.wl-interactive-chart,.lead-card,.lead-filters,.lead-modal-panel,.lead-edit-grid,.fu-panel,.fu-card,.hr-panel,.hr-card,.hr-person,.pm-panel,.pm-card,.pm-stats>div,.hr-stats>div,.fin-card){color:var(--he8-surface-text)!important}
html.wl-theme-active .content :is(.wl-kpi,.wl-panel,.wl-report,.wl-filter,.wl-legend,.wl-interactive-chart,.lead-card,.lead-filters,.lead-modal-panel,.fu-panel,.fu-card,.hr-panel,.hr-card,.hr-person,.pm-panel,.pm-card,.pm-stats>div,.hr-stats>div,.fin-card) :is(h1,h2,h3,h4,h5,h6,strong,b,.wl-chart-center,.wl-kpi-label,.wl-kpi-note,.wl-chart-row,.wl-legend-row,.value,.number,.count){color:var(--he8-surface-text)!important;opacity:1!important}
html.wl-theme-active .content :is(.wl-kpi,.wl-panel,.wl-report,.wl-filter,.lead-card,.lead-filters,.lead-modal-panel,.fu-panel,.fu-card,.hr-panel,.hr-card,.hr-person,.pm-panel,.pm-card,.pm-stats>div,.fin-card) :is(label,small,p,.muted,.hint,.subtext,.wl-kpi-label,.wl-kpi-note){color:var(--he8-surface-muted)!important;opacity:1!important}
html.wl-theme-active .content :is(.lead-filters,.lead-modal-panel,.lead-edit-grid,.lead-form,.fu-form,.hr-form,.pm-project-form,.wl-report,.wl-filter) label{color:var(--he8-surface-text)!important;opacity:1!important}
html.wl-theme-active .content :is(.wl-kpi,.wl-legend-row,.wl-chart-center,.wl-chart-row,.wl-report,.wl-panel) :is(span,strong,b,small){color:var(--he8-surface-text)!important;opacity:1!important}
html.wl-theme-active .content .wl-kpi>strong{color:var(--he8-surface-text)!important}
html.wl-theme-active .content .wl-total :is(strong,b,h1,h2,span,small,p){color:var(--he8-primary-text)!important}
html.wl-theme-active .content :is(.lead-card,.lead-modal-panel,.lead-filters,.fu-card,.hr-card,.pm-card) :is(.muted,small,.hint,.subtext){color:var(--he8-surface-muted)!important}
html.wl-theme-active .content :is(input,textarea)::placeholder{color:var(--he8-surface-muted)!important;opacity:1!important}
html.wl-theme-active .content .pm-pill{background:var(--he8-pill-bg)!important;color:var(--he8-pill-text)!important;border:1px solid var(--he8-selected-border)!important;opacity:1!important}
/* Tabs: selected state is persistent, not just :hover. Works for dashboard date/scope and module tabs. */
html.wl-theme-active .content :is(.wl-tabs,.wl-dates,.wl-date-filters,.wl-scope,.wl-filter,.fu-tabs,.hr-tabs,.fin-tabs,.fin-legacy-root-tabs,.pm-tabs) :is(button,span[role=tab]){transition:background-color .15s,color .15s,border-color .15s,box-shadow .15s!important;cursor:pointer}
html.wl-theme-active .content :is(.wl-tabs,.wl-dates,.wl-date-filters,.wl-scope,.wl-filter,.fu-tabs,.hr-tabs,.fin-tabs,.fin-legacy-root-tabs,.pm-tabs) :is(button,span[role=tab]):is(.selected,.active,[aria-selected=true],[aria-pressed=true]){background:var(--he8-selected-bg)!important;color:var(--he8-selected-text)!important;border:2px solid var(--he8-selected-border)!important;box-shadow:inset 0 -3px 0 var(--he8-selected-border)!important;font-weight:750!important}
html.wl-theme-active .content :is(.wl-tabs,.wl-dates,.wl-date-filters,.wl-scope,.wl-filter,.fu-tabs,.hr-tabs,.fin-tabs,.fin-legacy-root-tabs,.pm-tabs) :is(button,span[role=tab]):not(.selected):not(.active):not([aria-selected=true]):not([aria-pressed=true]):hover{background:var(--he8-hover-bg)!important;color:var(--he8-hover-text)!important;border-color:var(--he8-selected-border)!important;box-shadow:0 0 0 1px var(--he8-selected-border)!important}
/* Dashboard buttons can be direct children rather than nested in .wl-tabs. */
html.wl-theme-active .content .wl-dashboard button.selected,html.wl-theme-active .content .wl-dashboard button[aria-pressed=true]{background:var(--he8-selected-bg)!important;color:var(--he8-selected-text)!important;border:2px solid var(--he8-selected-border)!important;box-shadow:inset 0 -3px 0 var(--he8-selected-border)!important}
html.wl-theme-active .content .wl-dashboard button:not(.selected):not([aria-pressed=true]):hover{background:var(--he8-hover-bg)!important;color:var(--he8-hover-text)!important;border-color:var(--he8-selected-border)!important}
html.wl-theme-active .content .fu-tabs>button.selected,html.wl-theme-active .content .hr-tabs>.selected{background:var(--he8-selected-bg)!important;color:var(--he8-selected-text)!important;border:2px solid var(--he8-selected-border)!important;box-shadow:inset 0 -3px 0 var(--he8-selected-border)!important}
html.wl-theme-active .content .hr-tabs>span:not(.selected):hover{background:var(--he8-hover-bg)!important;color:var(--he8-hover-text)!important}
html.wl-theme-active .content .fu-grid>button{background:var(--wl-theme-surface)!important;color:var(--he8-surface-text)!important}
html.wl-theme-active .content .fu-grid>button:hover{background:var(--he8-hover-bg)!important;color:var(--he8-hover-text)!important;border-color:var(--he8-selected-border)!important}
html.wl-theme-active .content :is(.fu-grid b,.fu-tabs #taskBadge){background:var(--he8-pill-bg)!important;color:var(--he8-pill-text)!important;border:1px solid var(--he8-selected-border)!important}
html.wl-theme-active .content .hr-card:hover{border-color:var(--he8-selected-border)!important;box-shadow:0 0 0 1px var(--he8-selected-border)!important}
@media(prefers-reduced-motion:reduce){html.wl-theme-active .content button{transition:none!important}}
