/* Theme component contract: load last. All neutral surfaces/ink come from tokens.
   Semantic campaign status colors and primary/danger actions stay distinct. */
.norella-team-toolbar,.norella-workspace-picker>summary{
 background:var(--theme-surface2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;
}
.norella-workspace-options{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.norella-team-toolbar .norella-workspace-tab{
 background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;opacity:1!important;
}
.norella-team-toolbar .norella-workspace-tab.is-active,
.norella-team-toolbar .norella-workspace-tab:hover,
.norella-team-toolbar .norella-workspace-tab:focus-visible{
 background:var(--theme-active)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important;filter:none;
}
#norellaCurrentWorkspace{color:var(--theme-muted)!important;opacity:1!important}
/* The table row is one surface; opaque cells must not leave dark stripes. */
.dashboard .table-wrap tbody tr{background:var(--theme-surface)!important}
.dashboard .table-wrap tbody td{background:transparent!important;color:var(--theme-text)!important}
.dashboard .table-wrap tbody tr:hover,
.dashboard .table-wrap tbody tr:focus-within,
.dashboard .table-wrap tbody tr:has(input[type=checkbox]:checked){background:var(--theme-active)!important}
.dashboard .table-wrap tbody tr:hover td{background:transparent!important}
.dashboard .table-wrap .w-name,.dashboard .table-wrap .project-name-link{color:var(--theme-text)!important}
:root[data-theme=light] .inline-status{background:color-mix(in srgb,var(--status-color) 12%,var(--theme-input))!important;color:color-mix(in srgb,var(--status-color) 54%,black)!important;filter:none!important}
/* Control-center header, buttons and labels have the same palette as its body. */
.nc-shell,.nc-head,.nc-side,.nc-panel,.nc-content,.nc-employee{color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.nc-head{background:var(--theme-surface2)!important}
.nc-shell h2,.nc-shell h3,.nc-shell h4,.nc-shell label{color:var(--theme-text)!important}
.nc-shell p,.nc-shell small,.nc-head small{color:var(--theme-muted)}
.nc-shell button:not(.nc-primary):not(.nc-danger),.nc-shell #ncClose{
 color:var(--theme-text)!important;background:var(--theme-surface2)!important;border-color:var(--theme-border)!important;
}
.nc-shell .nc-side-link.is-active,.nc-shell .nc-employee.selected,.nc-shell .v13-role-item.selected{background:var(--theme-active)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important}
.nc-shell input::placeholder,.nc-shell textarea::placeholder{color:var(--theme-muted)!important;opacity:1}
/* Lead table tools and dialogs, including active date filters. */
.nlh-filters .nlh-selected{background:var(--theme-active)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important}
.nlh-table th,.nlh-table td,.nlh-table-scroll,.nlh-dialog-header{border-color:var(--theme-border)!important}
.nlh-table th{color:var(--theme-muted)!important;background:var(--theme-surface2)!important}
.nlh-table-summary>div,.nlh-empty,.nlh-column-panel,.nlh-preview{background:var(--theme-surface2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.nlh-token code{background:var(--theme-input);color:var(--theme-text)}
/* Team chat and task overlays no longer impose their own permanent dark skin. */
.norella-sheet,.norella-chat-panel,.norella-chat-settings,.norella-inbox-compose,.norella-unified-feed{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.norella-chat-panel-header,.norella-bubble,.norella-contact-chip,.norella-msg{background:var(--theme-surface2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.norella-bubble.mine,.norella-msg.mine,.norella-contact-chip.active{background:var(--theme-active)!important;color:var(--theme-text)!important}
.norella-chat-panel-header small,.norella-bubble time,.norella-compose-top strong{color:var(--theme-muted)!important;opacity:1}
.norella-chat-panel button:not([type=submit]),.norella-chat-settings-btn,.norella-chat-sound-row button,.norella-chat-sound-row select{background:var(--theme-surface2)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
.norella-inline-reply,.norella-go-project{color:var(--theme-accent)!important}
.norella-sheet input,.norella-sheet select,.norella-sheet textarea{color:var(--theme-text)!important;background:var(--theme-input)!important;border-color:var(--theme-border)!important}

#tableCount{color:var(--theme-muted)!important}
#metricTotal{color:var(--theme-text)!important}
#metricActive,.w-budget-icon{color:var(--theme-positive)!important}
#metricBudget,#metricPaused{color:var(--theme-attention)!important}
#metricRefused{color:var(--theme-negative)!important}
.norella-project-leads{background:var(--theme-active)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important}
input::placeholder,textarea::placeholder,.dashboard input::placeholder,.dashboard textarea::placeholder{color:var(--theme-muted)!important;opacity:1!important}
.norella-chat-panel .norella-contact-chip.active{background:var(--theme-active)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important}
.norella-bubble-line.is-outgoing .norella-bubble{background:var(--theme-active)!important;color:var(--theme-text)!important}
.norella-bubble-sender{color:var(--theme-text)!important}
.norella-tabs button.active{background:var(--theme-active)!important;color:var(--theme-text)!important;border-color:var(--theme-accent)!important}
.norella-action,.norella-form button[type=submit],.norella-inbox-compose button[type=submit]{background:var(--theme-action,#137968)!important;color:#fff!important;border-color:var(--theme-accent)!important}
.norella-enter-hint,.norella-section-kicker{color:var(--theme-muted)!important;opacity:1}
