.pledgerstotals {
    background-color: transparent;
    border-radius: 8px;
    width: 300px;
    border: 1px solid rgba(65, 100, 230, 0.4);
    background: #fff;
}

.pledgerstotals .totalsHeader {
    font-family: "Metropolis Bold";
    font-size: 20px;
    line-height: 32px;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.87);
    /* background-color is set dynamically via JavaScript using mainColor */
    padding: 5px 0px;
    text-align: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.pledgerstotals .totalsRow {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid lightgray;
    padding: 5px 10px;
}

.pledgerstotals .totalsRow:last-child {
    border-bottom: none;
}

.pledgerstotals .totalsLabel {
    font-family: "Metropolis Regular";
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0.18px;
    color: var(--mainColor, #4b4a4a);
    width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pledgerstotals .totalsRow.bgPledge .totalsLabel {
    font-family: "Metropolis Bold";
}

.pledgerstotals .totalsValue {
    font-family: "Metropolis Regular";
    font-size: 18px;
    line-height: 24px;
    letter-spacing: 0.18px;
    color: var(--mainColor, #4b4a4a);
}

.pledgerstotals .totalsRow:last-child {
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* DARK MODE — driven by body.dark from theme-handler */
.dark .pledgerstotals {
    background: #131514;
    border-color: rgba(255, 255, 255, 0.87);
    box-shadow: none;
}

.dark .pledgerstotals .totalsRow {
    background-color: #131514;
    border-bottom-color: rgba(255, 255, 255, 0.4);
}

.dark .pledgerstotals .totalsLabel,
.dark .pledgerstotals .totalsValue {
    color: rgba(255, 255, 255, 0.87);
}