.history-toolbar {
    margin-bottom: 0.85rem;
}

.history-toolbar.hidden {
    display: none;
}

.history-sort-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.history-sort-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
}

.history-sort-control {
    flex: 1;
    min-width: 0;
}

.history-sort-select {
    width: 100%;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(15, 23, 42, 0.85);
    color: #f1f5f9;
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position: calc(0% + 12px) calc(50% + 2px), calc(0% + 7px) calc(50% + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-left: 1.75rem;
}

.history-sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-soft);
}

.history-count {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}
