/* Final active-state cleanup: never render a closed bright outline. */
.sidebar .tool-btn.active,
.sidebar .sidebar-btn.active,
#settingsView .settings-tab-btn.active,
#settingsView .settings-tab-item.active,
#studyHelperTabBar .browser-tab.active,
#mediaTabBar .browser-tab.active,
.study-sub-btn.active,
.mode-option.selected,
.mode-card.selected,
.theme-card.active,
.history-item.active {
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.sidebar .tool-btn.active,
.sidebar .sidebar-btn.active,
#settingsView .settings-tab-btn.active,
#settingsView .settings-tab-item.active {
    border-left: 2px solid rgba(255, 255, 255, 0.72) !important;
}

body.light-mode .sidebar .tool-btn.active,
body.light-mode .sidebar .sidebar-btn.active,
body.light-mode #settingsView .settings-tab-btn.active,
body.light-mode #settingsView .settings-tab-item.active {
    border-left-color: var(--logicum-active-accent, rgba(15, 23, 42, 0.58)) !important;
}

.sidebar .tool-btn.active::before,
.sidebar .tool-btn.active::after,
.sidebar .sidebar-btn.active::before,
.sidebar .sidebar-btn.active::after,
#settingsView .settings-tab-btn.active::before,
#settingsView .settings-tab-btn.active::after,
#settingsView .settings-tab-item.active::before,
#settingsView .settings-tab-item.active::after {
    display: none !important;
    content: none !important;
}

/* Match the main sidebar's inset active highlight proportions. */
#settingsView .settings-tabs-pills .settings-tab-btn,
#settingsView .settings-tabs-pills .settings-tab-btn.active {
    width: calc(100% - 24px) !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
}
