/* Keep native controls legible in light mode, including after late theme updates. */
html[data-bk-theme=light] :is(#dashboard-app,#bk-settings-root,.bk-floating-portal) button{background:var(--bk-panel,#fff)!important;color:var(--bk-text,#171717)!important;border-color:var(--bk-border,#e5e5e5)!important}
html[data-bk-theme=light] :is(#dashboard-app,#bk-settings-root,.bk-floating-portal) button:is([class*=primary],[class*=Primary],[type=submit],[role=switch][aria-checked=true]){background:var(--bk-text,#171717)!important;color:var(--bk-panel,#fff)!important;border-color:transparent!important}
html[data-bk-theme=light] #dashboard-app .bk-sidebar :is(.bk-nav-item,.bk-nav-subitem,.bk-nav-dock-item):is([data-active=true],[data-branch-active=true],:hover){background:var(--bk-active,#efefef)!important;color:var(--bk-text,#171717)!important}
html[data-bk-theme=light] #dashboard-app main [class*="_iconButton_"]{background:var(--bk-panel,#fff)!important;color:var(--bk-muted,#667085)!important}
html[data-bk-theme=light] :is(.bk-sidebar,main [class*="_iconButton_"]) svg{stroke:currentColor}
.bk-cat-upload-cloud{display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;border-radius:12px;background:var(--bk-active,#262626);color:var(--bk-text,#eee)}.bk-cat-upload-cloud svg{width:24px;height:24px;display:block}

/* Shared tables and cards must not inherit legacy hardcoded dark paint. */
html[data-bk-theme=light] #dashboard-app main :is([class*="_card_"],[class*="_tableCard_"],[class*="_tableScroll_"]){background-color:var(--bk-panel,#fff)!important;color:var(--bk-text,#171717)!important}
#dashboard-app main table{width:100%;border-collapse:separate!important;border-spacing:0;border-radius:12px;overflow:hidden;color:var(--bk-text)}
#dashboard-app main table thead{background:var(--bk-active)!important;color:var(--bk-muted)!important}
#dashboard-app main table thead th{background:var(--bk-active)!important;color:var(--bk-muted)!important}
#dashboard-app main table thead th:first-child{border-top-left-radius:12px}
#dashboard-app main table thead th:last-child{border-top-right-radius:12px}
html[data-bk-theme=light] #dashboard-app main table :is(tbody,tr,td){background-color:var(--bk-panel,#fff)!important;color:var(--bk-text,#171717)!important}
#dashboard-app main table tbody tr:hover td{background-color:var(--bk-active)!important}
#dashboard-app main nav button[class*="Button"]{border-radius:10px!important;min-height:36px}
html[data-bk-theme=light] #dashboard-app main nav button[class*="subtleButton"]{background-color:var(--bk-panel,#fff)!important;color:var(--bk-text,#171717)!important}
html[data-bk-theme=light] #dashboard-app main nav button[class*="primaryButton"]{color:#fff!important;border-color:#252525!important}
/* Footer actions remain separated even when the drawer is scrollable. */
#dashboard-app .bk-sidebar .bk-nav-actions{display:flex!important;flex-direction:column!important;gap:8px!important;padding-top:12px!important}
#dashboard-app .bk-sidebar .bk-nav-actions>.bk-nav-item{margin:0!important;flex-shrink:0;border-radius:12px!important}
html[data-bk-theme=light] #dashboard-app :is([class*="_statusTag_"],[class*="_statusBadge_"],[class*="_badge_"]){background-color:var(--bk-active,#f1f1f1)!important;color:var(--bk-text,#171717)!important}
html[data-bk-theme=light] #dashboard-app [class*="_statusTag_"]>i{background-color:var(--bk-muted,#667085)!important}
/* Affiliate tabs own their palette; primary-button overrides must not leak here. */
#dashboard-app main .bk-affiliate-tabs .bk-affiliate-tab{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 14px;border:1px solid var(--bk-border)!important;border-radius:10px;font:inherit;background:var(--bk-panel)!important;color:var(--bk-muted)!important;cursor:pointer;transition:none!important}
#dashboard-app main .bk-affiliate-tabs .bk-affiliate-tab[aria-pressed=true]{background:#f1f1f1!important;color:#171717!important;border-color:#f1f1f1!important;font-weight:700}
html[data-bk-theme=light] #dashboard-app main .bk-affiliate-tabs .bk-affiliate-tab[aria-pressed=true]{background:#252525!important;color:#fff!important;border-color:#252525!important}
#dashboard-app main .bk-affiliate-data table :is(tbody,tr,td),#dashboard-app main .bk-affiliate-data table tbody tr:hover td{background-color:var(--bk-panel)!important;transition:none!important}
#dashboard-app main .bk-affiliate-tab:focus-visible{outline:2px solid var(--bk-muted);outline-offset:3px}
