body {
    background-color: #f8f9fa;
}

.sidebar {
    min-height: calc(100vh - 56px);
    border-right: 1px solid rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    color: #333;
}

.sidebar .nav-link.active {
    color: #0d6efd;
    font-weight: 600;
}

@media (min-width: 768px) {
    .sidebar {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }
}

/* Hierarchy tree */
.tree-root, .tree-children {
    list-style: none;
    padding-left: 1.25rem;
    margin: 0;
}

.tree-root {
    padding-left: 0;
}

.tree-node {
    margin: .25rem 0;
}

.tree-node-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.tree-toggle {
    text-decoration: none;
    font-size: .7rem;
    transition: transform .15s ease;
}

.tree-toggle.collapsed {
    transform: rotate(-90deg);
}

.tree-leaf-bullet {
    display: inline-block;
    width: 1.25rem;
    text-align: center;
    color: #adb5bd;
}

/* Strategy rule drag-reorder */
.rule-item[draggable="true"] {
    cursor: grab;
}

.rule-item.dragging {
    opacity: .4;
}

/* Trades list: light-pink highlight for rows created by a front-end Member,
   not staff — !important since it needs to beat .table-striped's own
   nth-of-type row background. */
.table > tbody > tr.member-trade-row > td {
    background-color: #fde2ea !important;
}

/* Icon-only action buttons (Add/Edit/Delete/View/Open) */
.btn.btn-sm > .bi,
.btn.btn-sm.btn-primary > .bi {
    font-size: .9rem;
    vertical-align: -.1em;
}

a.btn > .bi:only-child,
button.btn > .bi:only-child {
    display: inline-flex;
    width: 1em;
}
